@opengeni/contracts 3.0.1 → 3.0.2-canary.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.
package/dist/atlassian.js CHANGED
@@ -17,7 +17,8 @@ import {
17
17
  AtlassianSyncCadence,
18
18
  SaveAtlassianSourcesRequest,
19
19
  atlassianScopesAllowRead
20
- } from "./chunk-EHHDZLGY.js";
20
+ } from "./chunk-YRCMZTY2.js";
21
+ import "./chunk-WBYTNVIW.js";
21
22
  import "./chunk-YBW5JSA3.js";
22
23
  import "./chunk-O5LEQHDM.js";
23
24
  import "./chunk-GRG7PHWQ.js";
@@ -4,7 +4,7 @@ import {
4
4
  SessionTenancyVisibility,
5
5
  UserResourceAuthorityGrant,
6
6
  UserResourceDelegation
7
- } from "./chunk-EHHDZLGY.js";
7
+ } from "./chunk-YRCMZTY2.js";
8
8
 
9
9
  // src/connection-authority.ts
10
10
  import { z } from "zod";
@@ -345,4 +345,4 @@ export {
345
345
  ConnectionUseAuditFact,
346
346
  ConnectionUseAuthorizationResult
347
347
  };
348
- //# sourceMappingURL=chunk-IRR7CBBW.js.map
348
+ //# sourceMappingURL=chunk-GJ5SNVJW.js.map
@@ -0,0 +1,28 @@
1
+ // src/mcp-endpoint.ts
2
+ function mcpEndpointIdentity(value) {
3
+ if (!value) return null;
4
+ try {
5
+ const url = new URL(value);
6
+ if (!["https:", "http:"].includes(url.protocol) || url.username || url.password) return null;
7
+ url.hash = "";
8
+ return url.href;
9
+ } catch {
10
+ return null;
11
+ }
12
+ }
13
+ function pluginMcpUnavailableReason(server) {
14
+ if (server.transport === "stdio" || !server.endpoint) return "Requires a local runtime";
15
+ if (server.transport && !["http", "streamable-http", "streamable_http"].includes(server.transport))
16
+ return "Unsupported transport: " + server.transport;
17
+ if (server.requiresConfiguration || server.endpoint.includes("{"))
18
+ return "Requires custom connection configuration";
19
+ const endpoint = mcpEndpointIdentity(server.endpoint);
20
+ if (!endpoint?.startsWith("https://")) return "Requires a valid HTTPS endpoint";
21
+ return null;
22
+ }
23
+
24
+ export {
25
+ mcpEndpointIdentity,
26
+ pluginMcpUnavailableReason
27
+ };
28
+ //# sourceMappingURL=chunk-WBYTNVIW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/mcp-endpoint.ts"],"sourcesContent":["/** Exact endpoint identity: normalize URL syntax, preserve paths and query parameters. */\nexport function mcpEndpointIdentity(value: string | null | undefined): string | null {\n if (!value) return null;\n try {\n const url = new URL(value);\n if (![\"https:\", \"http:\"].includes(url.protocol) || url.username || url.password) return null;\n url.hash = \"\";\n return url.href;\n } catch {\n return null;\n }\n}\n\nexport function pluginMcpUnavailableReason(server: {\n endpoint: string | null;\n transport?: string;\n requiresConfiguration?: boolean;\n}): string | null {\n if (server.transport === \"stdio\" || !server.endpoint) return \"Requires a local runtime\";\n if (\n server.transport &&\n ![\"http\", \"streamable-http\", \"streamable_http\"].includes(server.transport)\n )\n return \"Unsupported transport: \" + server.transport;\n if (server.requiresConfiguration || server.endpoint.includes(\"{\"))\n return \"Requires custom connection configuration\";\n const endpoint = mcpEndpointIdentity(server.endpoint);\n if (!endpoint?.startsWith(\"https://\")) return \"Requires a valid HTTPS endpoint\";\n return null;\n}\n"],"mappings":";AACO,SAAS,oBAAoB,OAAiD;AACnF,MAAI,CAAC,MAAO,QAAO;AACnB,MAAI;AACF,UAAM,MAAM,IAAI,IAAI,KAAK;AACzB,QAAI,CAAC,CAAC,UAAU,OAAO,EAAE,SAAS,IAAI,QAAQ,KAAK,IAAI,YAAY,IAAI,SAAU,QAAO;AACxF,QAAI,OAAO;AACX,WAAO,IAAI;AAAA,EACb,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEO,SAAS,2BAA2B,QAIzB;AAChB,MAAI,OAAO,cAAc,WAAW,CAAC,OAAO,SAAU,QAAO;AAC7D,MACE,OAAO,aACP,CAAC,CAAC,QAAQ,mBAAmB,iBAAiB,EAAE,SAAS,OAAO,SAAS;AAEzE,WAAO,4BAA4B,OAAO;AAC5C,MAAI,OAAO,yBAAyB,OAAO,SAAS,SAAS,GAAG;AAC9D,WAAO;AACT,QAAM,WAAW,oBAAoB,OAAO,QAAQ;AACpD,MAAI,CAAC,UAAU,WAAW,UAAU,EAAG,QAAO;AAC9C,SAAO;AACT;","names":[]}
@@ -36,8 +36,12 @@ function parseSkillFrontmatter(markdown) {
36
36
  uniqueKeys: true,
37
37
  prettyErrors: false
38
38
  });
39
- if (document.errors.length || document.warnings.length)
40
- throw new Error("Skill artifact SKILL.md has invalid YAML frontmatter");
39
+ if (document.errors.length || document.warnings.length) {
40
+ const issue = document.errors[0] ?? document.warnings[0];
41
+ throw new Error(
42
+ `This skill's SKILL.md header contains invalid YAML: ${issue.message}. The source file needs correcting.`
43
+ );
44
+ }
41
45
  const metadata = document.toJS({ maxAliasCount: 20 });
42
46
  if (!metadata || typeof metadata !== "object" || Array.isArray(metadata))
43
47
  throw new Error("Skill artifact SKILL.md frontmatter must be a mapping");
@@ -5517,11 +5521,26 @@ var McpMutationReceipt = z21.object({
5517
5521
  // src/sandbox-snapshots.ts
5518
5522
  var WORKSPACE_ARCHIVE_DESCRIPTOR_VERSION = 2;
5519
5523
  var WORKSPACE_ARCHIVE_OBJECT_REF_SCHEMA = "sandbox_archive_object_v1";
5520
- var OBJECT_KEY = /^sandbox-archives\/v1\/[0-9a-f-]{36}\/[0-9a-f-]{36}\/[0-9a-f-]{36}\/wa1:[0-9]{13}:[0-9a-f]{64}\.tar$/i;
5524
+ var UPLOAD_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
5525
+ var OBJECT_KEY = /^sandbox-archives\/v1\/([0-9a-f-]{36})\/([0-9a-f-]{36})\/([0-9a-f-]{36})\/(wa1:[0-9]{13}:[0-9a-f]{64})(?:\.([0-9a-f-]+))?\.tar$/i;
5526
+ function parseWorkspaceArchiveObjectKey(value) {
5527
+ if (typeof value !== "string") return null;
5528
+ const match = OBJECT_KEY.exec(value);
5529
+ if (!match || match[0] !== value || match[5] !== void 0 && !UPLOAD_ID.test(match[5])) {
5530
+ return null;
5531
+ }
5532
+ return {
5533
+ accountId: match[1],
5534
+ workspaceId: match[2],
5535
+ sandboxGroupId: match[3],
5536
+ revision: match[4],
5537
+ uploadId: match[5] ?? null
5538
+ };
5539
+ }
5521
5540
  function parseWorkspaceArchiveObjectRef(value) {
5522
5541
  if (!value || typeof value !== "object" || Array.isArray(value)) return null;
5523
5542
  const candidate = value;
5524
- if (candidate.schema !== WORKSPACE_ARCHIVE_OBJECT_REF_SCHEMA || typeof candidate.key !== "string" || !OBJECT_KEY.test(candidate.key) || typeof candidate.sha256 !== "string" || !SHA256.test(candidate.sha256) || !nonnegativeInteger(candidate.bytes) || candidate.bytes <= 0 || typeof candidate.backend !== "string" || candidate.backend.length === 0 || candidate.backend.length > 64) {
5543
+ if (candidate.schema !== WORKSPACE_ARCHIVE_OBJECT_REF_SCHEMA || typeof candidate.key !== "string" || !parseWorkspaceArchiveObjectKey(candidate.key) || typeof candidate.sha256 !== "string" || !SHA256.test(candidate.sha256) || !nonnegativeInteger(candidate.bytes) || candidate.bytes <= 0 || typeof candidate.backend !== "string" || candidate.backend.length === 0 || candidate.backend.length > 64) {
5525
5544
  return null;
5526
5545
  }
5527
5546
  return {
@@ -5533,7 +5552,18 @@ function parseWorkspaceArchiveObjectRef(value) {
5533
5552
  };
5534
5553
  }
5535
5554
  function workspaceArchiveObjectKey(input) {
5536
- return `sandbox-archives/v1/${input.accountId}/${input.workspaceId}/${input.sandboxGroupId}/${input.revision}.tar`;
5555
+ if (input.uploadId !== void 0 && (!UPLOAD_ID.test(input.uploadId) || input.uploadId.length !== 36)) {
5556
+ throw new Error("Invalid workspace archive upload UUID");
5557
+ }
5558
+ return `sandbox-archives/v1/${input.accountId}/${input.workspaceId}/${input.sandboxGroupId}/${input.revision}${input.uploadId === void 0 ? "" : `.${input.uploadId}`}.tar`;
5559
+ }
5560
+ function validateWorkspaceArchiveObjectRef(value, input) {
5561
+ const ref = parseWorkspaceArchiveObjectRef(value);
5562
+ const key = ref && parseWorkspaceArchiveObjectKey(ref.key);
5563
+ const descriptor = parseWorkspaceArchiveDescriptor(input.descriptor);
5564
+ if (!ref || !key || descriptor?.version !== 1 || key.accountId.toLowerCase() !== input.accountId.toLowerCase() || key.workspaceId.toLowerCase() !== input.workspaceId.toLowerCase() || key.sandboxGroupId.toLowerCase() !== input.sandboxGroupId.toLowerCase() || key.revision !== descriptor.revision || ref.sha256 !== descriptor.archiveSha256 || ref.bytes !== descriptor.archiveBytes)
5565
+ return null;
5566
+ return ref;
5537
5567
  }
5538
5568
  function workspaceArchivePayloadPresent(sessionState) {
5539
5569
  if (!sessionState) return false;
@@ -16458,6 +16488,7 @@ var SkillImportFileSummary = z36.object({
16458
16488
  contentSha256: z36.string().regex(/^[0-9a-f]{64}$/)
16459
16489
  });
16460
16490
  var SkillImportPreview = z36.object({
16491
+ markdown: z36.string().max(262144).optional(),
16461
16492
  source: SkillImportSource,
16462
16493
  sourceUrl: z36.string().url(),
16463
16494
  repositoryUrl: z36.string().url(),
@@ -16956,6 +16987,7 @@ var PluginInstallationSummary = z36.object({
16956
16987
  description: z36.string().max(4e3),
16957
16988
  category: z36.string().min(1).max(100),
16958
16989
  tags: z36.array(z36.string().min(1).max(100)).max(64),
16990
+ logoUrl: z36.string().url().max(2048).nullable().optional(),
16959
16991
  sourceUrl: z36.string().url().max(2048).nullable(),
16960
16992
  manifestDigest: z36.string().regex(/^[0-9a-f]{64}$/),
16961
16993
  installationVersion: z36.number().int().positive(),
@@ -17068,6 +17100,14 @@ var Session = /* @__PURE__ */ defineSkillContractSchema(
17068
17100
  workspaceId: z36.string().uuid(),
17069
17101
  accountId: z36.string().uuid(),
17070
17102
  status: SessionStatus,
17103
+ /** Detail-only failure evidence through lastSequence; independent of timeline paging. */
17104
+ failureDiagnostics: z36.object({
17105
+ eventId: z36.string().uuid(),
17106
+ sequence: z36.number().int().nonnegative(),
17107
+ turnId: z36.string().uuid().nullable(),
17108
+ occurredAt: z36.string(),
17109
+ payload: z36.unknown()
17110
+ }).nullable().optional(),
17071
17111
  /** Additive list projection. Detail reads may omit it. */
17072
17112
  backgroundCommandActivity: SessionBackgroundCommandActivity.optional(),
17073
17113
  /** Current non-deleted schedules targeting this session, including paused schedules. */
@@ -19928,7 +19968,8 @@ var MachineRuntimeCapabilities = z36.object({
19928
19968
  opStream: z36.boolean(),
19929
19969
  browserBridge: z36.boolean(),
19930
19970
  operationResourcePolicy: z36.boolean(),
19931
- operationCpuQuota: z36.boolean()
19971
+ operationCpuQuota: z36.boolean(),
19972
+ transactionalFsWrite: z36.boolean().default(false)
19932
19973
  });
19933
19974
  var MachineUpdateStatus = z36.enum([
19934
19975
  "requested",
@@ -21172,8 +21213,10 @@ export {
21172
21213
  McpMutationReceipt,
21173
21214
  WORKSPACE_ARCHIVE_DESCRIPTOR_VERSION,
21174
21215
  WORKSPACE_ARCHIVE_OBJECT_REF_SCHEMA,
21216
+ parseWorkspaceArchiveObjectKey,
21175
21217
  parseWorkspaceArchiveObjectRef,
21176
21218
  workspaceArchiveObjectKey,
21219
+ validateWorkspaceArchiveObjectRef,
21177
21220
  workspaceArchivePayloadPresent,
21178
21221
  omitInlineWorkspaceArchiveWhenObjectRefPresent,
21179
21222
  NATIVE_SNAPSHOT_PREFIXES,
@@ -22525,4 +22568,4 @@ export {
22525
22568
  ClientConfig,
22526
22569
  evaluateWorkspaceModelPolicy
22527
22570
  };
22528
- //# sourceMappingURL=chunk-EHHDZLGY.js.map
22571
+ //# sourceMappingURL=chunk-YRCMZTY2.js.map