@opensteer/protocol 0.7.2 → 0.7.4
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 +201 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +153 -4
- package/dist/index.d.ts +153 -4
- package/dist/index.js +187 -14
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2450,6 +2450,7 @@ var cloudActionMethods = [
|
|
|
2450
2450
|
var cloudErrorCodes = [
|
|
2451
2451
|
"CLOUD_AUTH_FAILED",
|
|
2452
2452
|
"CLOUD_SESSION_NOT_FOUND",
|
|
2453
|
+
"CLOUD_ARTIFACT_NOT_FOUND",
|
|
2453
2454
|
"CLOUD_SESSION_CLOSED",
|
|
2454
2455
|
"CLOUD_UNSUPPORTED_METHOD",
|
|
2455
2456
|
"CLOUD_INVALID_REQUEST",
|
|
@@ -2481,6 +2482,12 @@ var cloudSessionStatuses = [
|
|
|
2481
2482
|
"closed",
|
|
2482
2483
|
"failed"
|
|
2483
2484
|
];
|
|
2485
|
+
var cloudSessionRecordingStatuses = [
|
|
2486
|
+
"idle",
|
|
2487
|
+
"recording",
|
|
2488
|
+
"completed",
|
|
2489
|
+
"failed"
|
|
2490
|
+
];
|
|
2484
2491
|
var cloudSessionSourceTypes = [
|
|
2485
2492
|
"agent-thread",
|
|
2486
2493
|
"agent-run",
|
|
@@ -2490,6 +2497,9 @@ var cloudSessionSourceTypes = [
|
|
|
2490
2497
|
];
|
|
2491
2498
|
var cloudActionMethodSet = new Set(cloudActionMethods);
|
|
2492
2499
|
var cloudErrorCodeSet = new Set(cloudErrorCodes);
|
|
2500
|
+
var cloudSessionRecordingStatusSet = new Set(
|
|
2501
|
+
cloudSessionRecordingStatuses
|
|
2502
|
+
);
|
|
2493
2503
|
var cloudSessionSourceTypeSet = new Set(cloudSessionSourceTypes);
|
|
2494
2504
|
var cloudSessionStatusSet = new Set(cloudSessionStatuses);
|
|
2495
2505
|
function isCloudActionMethod(value) {
|
|
@@ -2504,6 +2514,9 @@ function isCloudSessionSourceType(value) {
|
|
|
2504
2514
|
function isCloudSessionStatus(value) {
|
|
2505
2515
|
return typeof value === "string" && cloudSessionStatusSet.has(value);
|
|
2506
2516
|
}
|
|
2517
|
+
function isCloudSessionRecordingStatus(value) {
|
|
2518
|
+
return typeof value === "string" && cloudSessionRecordingStatusSet.has(value);
|
|
2519
|
+
}
|
|
2507
2520
|
|
|
2508
2521
|
// src/errors.ts
|
|
2509
2522
|
var opensteerErrorCodes = [
|
|
@@ -3156,6 +3169,164 @@ function traceBundleSchema(dataSchema = {}) {
|
|
|
3156
3169
|
);
|
|
3157
3170
|
}
|
|
3158
3171
|
|
|
3172
|
+
// src/observability.ts
|
|
3173
|
+
var observabilityProfiles = ["off", "baseline", "diagnostic"];
|
|
3174
|
+
var observationEventPhases = [
|
|
3175
|
+
"started",
|
|
3176
|
+
"updated",
|
|
3177
|
+
"completed",
|
|
3178
|
+
"failed",
|
|
3179
|
+
"occurred"
|
|
3180
|
+
];
|
|
3181
|
+
var observationEventKinds = [
|
|
3182
|
+
"session",
|
|
3183
|
+
"operation",
|
|
3184
|
+
"page",
|
|
3185
|
+
"console",
|
|
3186
|
+
"error",
|
|
3187
|
+
"network",
|
|
3188
|
+
"artifact",
|
|
3189
|
+
"annotation",
|
|
3190
|
+
"runtime",
|
|
3191
|
+
"observability"
|
|
3192
|
+
];
|
|
3193
|
+
var observationArtifactKinds = [
|
|
3194
|
+
"screenshot",
|
|
3195
|
+
"dom-snapshot",
|
|
3196
|
+
"html-snapshot",
|
|
3197
|
+
"trace-bundle",
|
|
3198
|
+
"frame-buffer",
|
|
3199
|
+
"request-body",
|
|
3200
|
+
"response-body",
|
|
3201
|
+
"log",
|
|
3202
|
+
"other"
|
|
3203
|
+
];
|
|
3204
|
+
var observabilityProfileSchema = enumSchema(observabilityProfiles, {
|
|
3205
|
+
title: "ObservabilityProfile"
|
|
3206
|
+
});
|
|
3207
|
+
var observabilityTraceContextSchema = objectSchema(
|
|
3208
|
+
{
|
|
3209
|
+
traceparent: stringSchema(),
|
|
3210
|
+
baggage: stringSchema()
|
|
3211
|
+
},
|
|
3212
|
+
{
|
|
3213
|
+
title: "ObservabilityTraceContext"
|
|
3214
|
+
}
|
|
3215
|
+
);
|
|
3216
|
+
var observabilityRedactionConfigSchema = objectSchema(
|
|
3217
|
+
{
|
|
3218
|
+
sensitiveKeys: arraySchema(stringSchema()),
|
|
3219
|
+
sensitiveValues: arraySchema(stringSchema())
|
|
3220
|
+
},
|
|
3221
|
+
{
|
|
3222
|
+
title: "ObservabilityRedactionConfig"
|
|
3223
|
+
}
|
|
3224
|
+
);
|
|
3225
|
+
var observabilityConfigSchema = objectSchema(
|
|
3226
|
+
{
|
|
3227
|
+
profile: observabilityProfileSchema,
|
|
3228
|
+
labels: recordSchema(stringSchema()),
|
|
3229
|
+
traceContext: observabilityTraceContextSchema,
|
|
3230
|
+
redaction: observabilityRedactionConfigSchema
|
|
3231
|
+
},
|
|
3232
|
+
{
|
|
3233
|
+
title: "ObservabilityConfig",
|
|
3234
|
+
required: ["profile"]
|
|
3235
|
+
}
|
|
3236
|
+
);
|
|
3237
|
+
var observationContextSchema = objectSchema(
|
|
3238
|
+
{
|
|
3239
|
+
sessionRef: sessionRefSchema,
|
|
3240
|
+
pageRef: pageRefSchema,
|
|
3241
|
+
frameRef: frameRefSchema,
|
|
3242
|
+
documentRef: documentRefSchema,
|
|
3243
|
+
documentEpoch: documentEpochSchema
|
|
3244
|
+
},
|
|
3245
|
+
{
|
|
3246
|
+
title: "ObservationContext"
|
|
3247
|
+
}
|
|
3248
|
+
);
|
|
3249
|
+
var observationEventErrorSchema = objectSchema(
|
|
3250
|
+
{
|
|
3251
|
+
code: stringSchema(),
|
|
3252
|
+
message: stringSchema(),
|
|
3253
|
+
retriable: {
|
|
3254
|
+
type: "boolean"
|
|
3255
|
+
},
|
|
3256
|
+
details: {}
|
|
3257
|
+
},
|
|
3258
|
+
{
|
|
3259
|
+
title: "ObservationEventError",
|
|
3260
|
+
required: ["message"]
|
|
3261
|
+
}
|
|
3262
|
+
);
|
|
3263
|
+
var observationEventSchema = objectSchema(
|
|
3264
|
+
{
|
|
3265
|
+
eventId: stringSchema(),
|
|
3266
|
+
sessionId: stringSchema(),
|
|
3267
|
+
sequence: integerSchema({ minimum: 1 }),
|
|
3268
|
+
kind: enumSchema(observationEventKinds),
|
|
3269
|
+
phase: enumSchema(observationEventPhases),
|
|
3270
|
+
createdAt: integerSchema({ minimum: 0 }),
|
|
3271
|
+
correlationId: stringSchema(),
|
|
3272
|
+
spanId: stringSchema(),
|
|
3273
|
+
parentSpanId: stringSchema(),
|
|
3274
|
+
context: observationContextSchema,
|
|
3275
|
+
data: {},
|
|
3276
|
+
error: observationEventErrorSchema,
|
|
3277
|
+
artifactIds: arraySchema(stringSchema())
|
|
3278
|
+
},
|
|
3279
|
+
{
|
|
3280
|
+
title: "ObservationEvent",
|
|
3281
|
+
required: ["eventId", "sessionId", "sequence", "kind", "phase", "createdAt", "correlationId"]
|
|
3282
|
+
}
|
|
3283
|
+
);
|
|
3284
|
+
var observationArtifactSchema = objectSchema(
|
|
3285
|
+
{
|
|
3286
|
+
artifactId: stringSchema(),
|
|
3287
|
+
sessionId: stringSchema(),
|
|
3288
|
+
kind: enumSchema(observationArtifactKinds),
|
|
3289
|
+
createdAt: integerSchema({ minimum: 0 }),
|
|
3290
|
+
context: observationContextSchema,
|
|
3291
|
+
mediaType: stringSchema(),
|
|
3292
|
+
byteLength: integerSchema({ minimum: 0 }),
|
|
3293
|
+
sha256: stringSchema(),
|
|
3294
|
+
opensteerArtifactId: stringSchema(),
|
|
3295
|
+
storageKey: stringSchema(),
|
|
3296
|
+
metadata: {}
|
|
3297
|
+
},
|
|
3298
|
+
{
|
|
3299
|
+
title: "ObservationArtifact",
|
|
3300
|
+
required: ["artifactId", "sessionId", "kind", "createdAt"]
|
|
3301
|
+
}
|
|
3302
|
+
);
|
|
3303
|
+
var observationSessionSchema = objectSchema(
|
|
3304
|
+
{
|
|
3305
|
+
sessionId: stringSchema(),
|
|
3306
|
+
profile: observabilityProfileSchema,
|
|
3307
|
+
labels: recordSchema(stringSchema()),
|
|
3308
|
+
traceContext: observabilityTraceContextSchema,
|
|
3309
|
+
openedAt: integerSchema({ minimum: 0 }),
|
|
3310
|
+
updatedAt: integerSchema({ minimum: 0 }),
|
|
3311
|
+
closedAt: integerSchema({ minimum: 0 }),
|
|
3312
|
+
currentSequence: integerSchema({ minimum: 0 }),
|
|
3313
|
+
eventCount: integerSchema({ minimum: 0 }),
|
|
3314
|
+
artifactCount: integerSchema({ minimum: 0 })
|
|
3315
|
+
},
|
|
3316
|
+
{
|
|
3317
|
+
title: "ObservationSession",
|
|
3318
|
+
required: [
|
|
3319
|
+
"sessionId",
|
|
3320
|
+
"profile",
|
|
3321
|
+
"openedAt",
|
|
3322
|
+
"updatedAt",
|
|
3323
|
+
"currentSequence",
|
|
3324
|
+
"eventCount",
|
|
3325
|
+
"artifactCount"
|
|
3326
|
+
]
|
|
3327
|
+
}
|
|
3328
|
+
);
|
|
3329
|
+
|
|
3159
3330
|
// src/envelopes.ts
|
|
3160
3331
|
function createRequestEnvelope(operation, input, options) {
|
|
3161
3332
|
return {
|
|
@@ -3268,7 +3439,7 @@ function responseEnvelopeSchema(dataSchema, operation) {
|
|
|
3268
3439
|
}
|
|
3269
3440
|
|
|
3270
3441
|
// src/session-info.ts
|
|
3271
|
-
var opensteerSessionGrantKinds = ["automation", "view", "cdp"];
|
|
3442
|
+
var opensteerSessionGrantKinds = ["semantic", "automation", "view", "cdp"];
|
|
3272
3443
|
|
|
3273
3444
|
// src/automation.ts
|
|
3274
3445
|
var opensteerAutomationOperationNames = [
|
|
@@ -6759,9 +6930,23 @@ var opensteerInspectStorageInputSchema = objectSchema(
|
|
|
6759
6930
|
title: "OpensteerInspectStorageInput"
|
|
6760
6931
|
}
|
|
6761
6932
|
);
|
|
6933
|
+
var opensteerComputerMouseButtonSchema = enumSchema(["left", "middle", "right"], {
|
|
6934
|
+
title: "OpensteerComputerMouseButton"
|
|
6935
|
+
});
|
|
6936
|
+
var opensteerComputerKeyModifierSchema = enumSchema(
|
|
6937
|
+
["Shift", "Control", "Alt", "Meta"],
|
|
6938
|
+
{
|
|
6939
|
+
title: "OpensteerComputerKeyModifier"
|
|
6940
|
+
}
|
|
6941
|
+
);
|
|
6762
6942
|
var opensteerDomClickInputSchema = objectSchema(
|
|
6763
6943
|
{
|
|
6764
6944
|
target: opensteerTargetInputSchema,
|
|
6945
|
+
button: opensteerComputerMouseButtonSchema,
|
|
6946
|
+
clickCount: integerSchema({ minimum: 1 }),
|
|
6947
|
+
modifiers: arraySchema(opensteerComputerKeyModifierSchema, {
|
|
6948
|
+
uniqueItems: true
|
|
6949
|
+
}),
|
|
6765
6950
|
persistAsDescription: stringSchema(),
|
|
6766
6951
|
captureNetwork: stringSchema({ minLength: 1 })
|
|
6767
6952
|
},
|
|
@@ -6861,18 +7046,6 @@ var opensteerSessionCloseOutputSchema = objectSchema(
|
|
|
6861
7046
|
required: ["closed"]
|
|
6862
7047
|
}
|
|
6863
7048
|
);
|
|
6864
|
-
var opensteerComputerMouseButtonSchema = enumSchema(
|
|
6865
|
-
["left", "middle", "right"],
|
|
6866
|
-
{
|
|
6867
|
-
title: "OpensteerComputerMouseButton"
|
|
6868
|
-
}
|
|
6869
|
-
);
|
|
6870
|
-
var opensteerComputerKeyModifierSchema = enumSchema(
|
|
6871
|
-
["Shift", "Control", "Alt", "Meta"],
|
|
6872
|
-
{
|
|
6873
|
-
title: "OpensteerComputerKeyModifier"
|
|
6874
|
-
}
|
|
6875
|
-
);
|
|
6876
7049
|
var opensteerComputerAnnotationSchema = enumSchema(opensteerComputerAnnotationNames, {
|
|
6877
7050
|
title: "OpensteerComputerAnnotation"
|
|
6878
7051
|
});
|
|
@@ -7765,6 +7938,7 @@ exports.captchaTypeSchema = captchaTypeSchema;
|
|
|
7765
7938
|
exports.chooserRefSchema = chooserRefSchema;
|
|
7766
7939
|
exports.cloudActionMethods = cloudActionMethods;
|
|
7767
7940
|
exports.cloudErrorCodes = cloudErrorCodes;
|
|
7941
|
+
exports.cloudSessionRecordingStatuses = cloudSessionRecordingStatuses;
|
|
7768
7942
|
exports.cloudSessionSourceTypes = cloudSessionSourceTypes;
|
|
7769
7943
|
exports.cloudSessionStatuses = cloudSessionStatuses;
|
|
7770
7944
|
exports.cookiePrioritySchema = cookiePrioritySchema;
|
|
@@ -7800,6 +7974,7 @@ exports.indexedDbRecordSchema = indexedDbRecordSchema;
|
|
|
7800
7974
|
exports.integerSchema = integerSchema;
|
|
7801
7975
|
exports.isCloudActionMethod = isCloudActionMethod;
|
|
7802
7976
|
exports.isCloudErrorCode = isCloudErrorCode;
|
|
7977
|
+
exports.isCloudSessionRecordingStatus = isCloudSessionRecordingStatus;
|
|
7803
7978
|
exports.isCloudSessionSourceType = isCloudSessionSourceType;
|
|
7804
7979
|
exports.isCloudSessionStatus = isCloudSessionStatus;
|
|
7805
7980
|
exports.isErrorEnvelope = isErrorEnvelope;
|
|
@@ -7828,6 +8003,19 @@ exports.nodeLocatorSchema = nodeLocatorSchema;
|
|
|
7828
8003
|
exports.nodeRefSchema = nodeRefSchema;
|
|
7829
8004
|
exports.numberSchema = numberSchema;
|
|
7830
8005
|
exports.objectSchema = objectSchema;
|
|
8006
|
+
exports.observabilityConfigSchema = observabilityConfigSchema;
|
|
8007
|
+
exports.observabilityProfileSchema = observabilityProfileSchema;
|
|
8008
|
+
exports.observabilityProfiles = observabilityProfiles;
|
|
8009
|
+
exports.observabilityRedactionConfigSchema = observabilityRedactionConfigSchema;
|
|
8010
|
+
exports.observabilityTraceContextSchema = observabilityTraceContextSchema;
|
|
8011
|
+
exports.observationArtifactKinds = observationArtifactKinds;
|
|
8012
|
+
exports.observationArtifactSchema = observationArtifactSchema;
|
|
8013
|
+
exports.observationContextSchema = observationContextSchema;
|
|
8014
|
+
exports.observationEventErrorSchema = observationEventErrorSchema;
|
|
8015
|
+
exports.observationEventKinds = observationEventKinds;
|
|
8016
|
+
exports.observationEventPhases = observationEventPhases;
|
|
8017
|
+
exports.observationEventSchema = observationEventSchema;
|
|
8018
|
+
exports.observationSessionSchema = observationSessionSchema;
|
|
7831
8019
|
exports.oneOfSchema = oneOfSchema;
|
|
7832
8020
|
exports.opensteerArtifactReadInputSchema = opensteerArtifactReadInputSchema;
|
|
7833
8021
|
exports.opensteerArtifactReadOutputSchema = opensteerArtifactReadOutputSchema;
|