@skyramp/testbot-core 0.13.0-v3.424 → 0.13.0-v3.426

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.
@@ -2369,22 +2369,22 @@ declare const RunManifestV1Schema: z.ZodEffects<z.ZodObject<{
2369
2369
  id: z.ZodString;
2370
2370
  revision: z.ZodString;
2371
2371
  }, "strict", z.ZodTypeAny, {
2372
- id: string;
2373
2372
  revision: string;
2374
- }, {
2375
2373
  id: string;
2374
+ }, {
2376
2375
  revision: string;
2376
+ id: string;
2377
2377
  }>;
2378
2378
  /** Null exactly for a trigger in POLICYLESS_TRIGGERS, such as `sut_setup`. */
2379
2379
  policy: z.ZodNullable<z.ZodObject<{
2380
2380
  id: z.ZodString;
2381
2381
  revision: z.ZodString;
2382
2382
  }, "strict", z.ZodTypeAny, {
2383
- id: string;
2384
2383
  revision: string;
2385
- }, {
2386
2384
  id: string;
2385
+ }, {
2387
2386
  revision: string;
2387
+ id: string;
2388
2388
  }>>;
2389
2389
  trigger: z.ZodObject<{
2390
2390
  kind: z.ZodNativeEnum<typeof TriggerKind>;
@@ -2950,8 +2950,8 @@ declare const RunManifestV1Schema: z.ZodEffects<z.ZodObject<{
2950
2950
  }>, "many">>;
2951
2951
  }, "strict", z.ZodTypeAny, {
2952
2952
  target: {
2953
- id: string;
2954
2953
  revision: string;
2954
+ id: string;
2955
2955
  };
2956
2956
  schemaVersion: 1;
2957
2957
  credentials: {
@@ -2999,8 +2999,8 @@ declare const RunManifestV1Schema: z.ZodEffects<z.ZodObject<{
2999
2999
  runId: string;
3000
3000
  skyrampOrgId: string;
3001
3001
  policy: {
3002
- id: string;
3003
3002
  revision: string;
3003
+ id: string;
3004
3004
  } | null;
3005
3005
  trigger: {
3006
3006
  kind: TriggerKind;
@@ -3093,8 +3093,8 @@ declare const RunManifestV1Schema: z.ZodEffects<z.ZodObject<{
3093
3093
  }[] | undefined;
3094
3094
  }, {
3095
3095
  target: {
3096
- id: string;
3097
3096
  revision: string;
3097
+ id: string;
3098
3098
  };
3099
3099
  schemaVersion: 1;
3100
3100
  credentials: {
@@ -3142,8 +3142,8 @@ declare const RunManifestV1Schema: z.ZodEffects<z.ZodObject<{
3142
3142
  runId: string;
3143
3143
  skyrampOrgId: string;
3144
3144
  policy: {
3145
- id: string;
3146
3145
  revision: string;
3146
+ id: string;
3147
3147
  } | null;
3148
3148
  trigger: {
3149
3149
  kind: TriggerKind;
@@ -3236,8 +3236,8 @@ declare const RunManifestV1Schema: z.ZodEffects<z.ZodObject<{
3236
3236
  }[] | undefined;
3237
3237
  }>, {
3238
3238
  target: {
3239
- id: string;
3240
3239
  revision: string;
3240
+ id: string;
3241
3241
  };
3242
3242
  schemaVersion: 1;
3243
3243
  credentials: {
@@ -3285,8 +3285,8 @@ declare const RunManifestV1Schema: z.ZodEffects<z.ZodObject<{
3285
3285
  runId: string;
3286
3286
  skyrampOrgId: string;
3287
3287
  policy: {
3288
- id: string;
3289
3288
  revision: string;
3289
+ id: string;
3290
3290
  } | null;
3291
3291
  trigger: {
3292
3292
  kind: TriggerKind;
@@ -3379,8 +3379,8 @@ declare const RunManifestV1Schema: z.ZodEffects<z.ZodObject<{
3379
3379
  }[] | undefined;
3380
3380
  }, {
3381
3381
  target: {
3382
- id: string;
3383
3382
  revision: string;
3383
+ id: string;
3384
3384
  };
3385
3385
  schemaVersion: 1;
3386
3386
  credentials: {
@@ -3428,8 +3428,8 @@ declare const RunManifestV1Schema: z.ZodEffects<z.ZodObject<{
3428
3428
  runId: string;
3429
3429
  skyrampOrgId: string;
3430
3430
  policy: {
3431
- id: string;
3432
3431
  revision: string;
3432
+ id: string;
3433
3433
  } | null;
3434
3434
  trigger: {
3435
3435
  kind: TriggerKind;
@@ -4700,6 +4700,46 @@ declare enum CommitLookup {
4700
4700
  /** The code host gave no answer. */
4701
4701
  Unknown = "unknown"
4702
4702
  }
4703
+ declare const PersistentDataPolicySchema: z.ZodObject<{
4704
+ environmentId: z.ZodString;
4705
+ allowed: z.ZodBoolean;
4706
+ revision: z.ZodString;
4707
+ updatedAt: z.ZodString;
4708
+ updatedBy: z.ZodString;
4709
+ }, "strict", z.ZodTypeAny, {
4710
+ environmentId: string;
4711
+ allowed: boolean;
4712
+ revision: string;
4713
+ updatedAt: string;
4714
+ updatedBy: string;
4715
+ }, {
4716
+ environmentId: string;
4717
+ allowed: boolean;
4718
+ revision: string;
4719
+ updatedAt: string;
4720
+ updatedBy: string;
4721
+ }>;
4722
+ export type PersistentDataPolicy = z.infer<typeof PersistentDataPolicySchema>;
4723
+ declare enum PersistenceRefusal {
4724
+ /** The run has no selected Test Environment with an address. */
4725
+ NoEnvironment = "no_environment",
4726
+ /** The run's configuration did not record an allowed grant for that environment. */
4727
+ NoRecordedGrant = "no_recorded_grant",
4728
+ /** The app could not be reached, refused the job's identity, or answered something the engine cannot read. */
4729
+ Unavailable = "unavailable",
4730
+ /** The app answered for another environment or address, or the grant has another revision than the run recorded. */
4731
+ Changed = "changed",
4732
+ /** The environment's current policy does not permit test data to stay. */
4733
+ Denied = "denied",
4734
+ /** The request is outside the environment's address. */
4735
+ OutOfScope = "out_of_scope"
4736
+ }
4737
+ export type PersistenceDecision = {
4738
+ allowed: true;
4739
+ } | {
4740
+ allowed: false;
4741
+ refusal: PersistenceRefusal;
4742
+ };
4703
4743
  /** One pull request of the Change Set, as the session reads it. */
4704
4744
  export interface ChangeSetPullRequest {
4705
4745
  /** owner/repo. */
@@ -5014,6 +5054,27 @@ export declare function uploadV3Report(attempt: V3Attempt, input: {
5014
5054
  report: StagedTestbotReport;
5015
5055
  };
5016
5056
  }): Promise<void>;
5057
+ /**
5058
+ * Reads permission anew using this attempt's job identity: the policy, or why there is none. A local file or cached
5059
+ * Runtime Plan is a record, never a substitute for this read. An answer for another environment or address, a missing
5060
+ * policy, and a failed or unreadable read grant no persistence.
5061
+ */
5062
+ export declare function fetchV3PersistentDataPolicy(attempt: V3Attempt, environmentId: string, environmentAddress: string): Promise<{
5063
+ policy: PersistentDataPolicy;
5064
+ } | {
5065
+ refusal: PersistenceRefusal;
5066
+ }>;
5067
+ /**
5068
+ * Whether this attempt may keep test data at `requestUrl` now. One call binds the environment, its saved address and
5069
+ * the request: the fresh read must answer for the same address the request is scoped against. The run must have
5070
+ * recorded an allowed grant, and the current grant must be allowed at that same revision: a grant made, changed or
5071
+ * revoked after the run started does not apply.
5072
+ */
5073
+ export declare function currentV3PersistenceDecision(attempt: V3Attempt, environment: {
5074
+ environmentId?: string;
5075
+ environmentAddress?: string;
5076
+ persistentDataPolicy?: PersistentDataPolicy;
5077
+ }, requestUrl: string): Promise<PersistenceDecision>;
5017
5078
  /** Why the attempt ended without a report: a cancellation, or one of the contract's causes. */
5018
5079
  export type V3EndCause = AttemptEndReason.Cancelled | NoReportCause;
5019
5080
  /** What the main step learned about the attempt, which the post step turns into the attempt end. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyramp/testbot-core",
3
- "version": "0.13.0-v3.424",
3
+ "version": "0.13.0-v3.426",
4
4
  "description": "Skyramp Testbot engine: AI-powered deterministic test generation, execution and maintenance",
5
5
  "main": "dist/main.js",
6
6
  "//files": "An explicit allowlist, never a glob. `dist/` is gitignored, so without this key npm's .gitignore fallback would publish a package with no engine in it; with a glob it would publish the sourcemaps, whose sourcesContent embeds every src/*.ts verbatim. dist/VERSION.json exists only in a release-engine.yml build.",