deepline 0.3.19 → 0.3.21
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/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +123 -29
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +12 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-response-contract.ts +51 -4
- package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +2 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +29 -2
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +60 -2
- package/dist/bundling-sources/shared_libs/plays/contracts.ts +36 -5
- package/dist/cli/index.js +55 -5
- package/dist/cli/index.mjs +55 -5
- package/dist/{compiler-manifest-Bd0O94yZ.d.mts → compiler-manifest-DwYe2C2S.d.mts} +24 -1
- package/dist/{compiler-manifest-Bd0O94yZ.d.ts → compiler-manifest-DwYe2C2S.d.ts} +24 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/install-integrity.json +2 -2
- package/dist/plays/bundle-play-file.d.mts +9 -3
- package/dist/plays/bundle-play-file.d.ts +9 -3
- package/dist/plays/bundle-play-file.mjs +85 -7
- package/package.json +1 -1
|
@@ -2747,6 +2747,26 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
|
|
|
2747
2747
|
description: "Artifact-pinned tool error behavior, either 0 or 1.",
|
|
2748
2748
|
errorMessage: "compatibility.toolErrorSchemaVersion must be the static literal 0 or 1."
|
|
2749
2749
|
},
|
|
2750
|
+
"compatibility.toolResponseReceiptRevision": {
|
|
2751
|
+
schema: Type.String({
|
|
2752
|
+
minLength: 1,
|
|
2753
|
+
maxLength: 64,
|
|
2754
|
+
pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
|
|
2755
|
+
}),
|
|
2756
|
+
fixtures: {
|
|
2757
|
+
valid: "raw-v2-receipt-v1",
|
|
2758
|
+
invalid: "has spaces",
|
|
2759
|
+
absent: void 0,
|
|
2760
|
+
unresolved: { expression: "revision" },
|
|
2761
|
+
edition1: void 0
|
|
2762
|
+
},
|
|
2763
|
+
referenceType: "string",
|
|
2764
|
+
required: false,
|
|
2765
|
+
resolution: "static-required",
|
|
2766
|
+
issueCode: "play_authoring_binding_invalid",
|
|
2767
|
+
description: "Explicit durable-receipt revision for a response transformation; bump only when serialized tool output changes.",
|
|
2768
|
+
errorMessage: "compatibility.toolResponseReceiptRevision must be a non-empty static identifier using letters, numbers, dots, underscores, or hyphens."
|
|
2769
|
+
},
|
|
2750
2770
|
inline: {
|
|
2751
2771
|
schema: Type.Boolean(),
|
|
2752
2772
|
fixtures: {
|
|
@@ -3934,7 +3954,7 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
|
|
|
3934
3954
|
"};",
|
|
3935
3955
|
"export type PlayBindings = {",
|
|
3936
3956
|
` description?: ${cloudReferenceType("description")};`,
|
|
3937
|
-
` compatibility?: { toolErrorSchemaVersion
|
|
3957
|
+
` compatibility?: { toolErrorSchemaVersion?: ${cloudReferenceType("compatibility.toolErrorSchemaVersion")}; toolResponseReceiptRevision?: ${cloudReferenceType("compatibility.toolResponseReceiptRevision")} };`,
|
|
3938
3958
|
` inline?: ${cloudReferenceType("inline")};`,
|
|
3939
3959
|
` billing?: { maxCreditsPerRun?: ${cloudReferenceType("billing.maxCreditsPerRun")} };`,
|
|
3940
3960
|
` runtime?: { timeout?: ${cloudReferenceType("runtime.timeout")}; size?: ${cloudReferenceType("runtime.size")} };`,
|
|
@@ -4010,6 +4030,23 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
|
|
|
4010
4030
|
|
|
4011
4031
|
// ../shared_libs/play-runtime/tool-response-contract.ts
|
|
4012
4032
|
var RAW_V2_TOOL_RESPONSE_CONTRACT = "raw-v2";
|
|
4033
|
+
var RAW_V2_TOOL_RESPONSE_RECEIPT_REVISION = "raw-v2-receipt-v1";
|
|
4034
|
+
var TOOL_RESPONSE_RECEIPT_REVISION_PATTERN = /^[A-Za-z0-9](?:[A-Za-z0-9._-]{0,63})$/;
|
|
4035
|
+
var InvalidToolResponseReceiptRevisionError = class extends Error {
|
|
4036
|
+
constructor(value) {
|
|
4037
|
+
super(
|
|
4038
|
+
`Tool response receipt revision must be a non-empty static identifier (letters, numbers, '.', '_', or '-'); received ${String(value)}.`
|
|
4039
|
+
);
|
|
4040
|
+
this.name = "InvalidToolResponseReceiptRevisionError";
|
|
4041
|
+
}
|
|
4042
|
+
};
|
|
4043
|
+
function normalizeToolResponseReceiptRevision(value) {
|
|
4044
|
+
if (value == null) return void 0;
|
|
4045
|
+
if (typeof value === "string" && TOOL_RESPONSE_RECEIPT_REVISION_PATTERN.test(value)) {
|
|
4046
|
+
return value;
|
|
4047
|
+
}
|
|
4048
|
+
throw new InvalidToolResponseReceiptRevisionError(value);
|
|
4049
|
+
}
|
|
4013
4050
|
|
|
4014
4051
|
// ../shared_libs/plays/contracts.ts
|
|
4015
4052
|
var PLAY_PUBLIC_API_VERSION = 1;
|
|
@@ -4030,7 +4067,10 @@ function buildPlayContractCompatibility(input) {
|
|
|
4030
4067
|
runtimeBackend: input?.runtimeBackend ?? null,
|
|
4031
4068
|
toolErrorSchemaVersion: input?.toolErrorSchemaVersion ?? TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
|
|
4032
4069
|
authoringContractEdition: input?.authoringContractEdition ?? PLAY_AUTHORING_CONTRACT_EDITION,
|
|
4033
|
-
toolResponseContract: input?.toolResponseContract ?? RAW_V2_TOOL_RESPONSE_CONTRACT
|
|
4070
|
+
toolResponseContract: input?.toolResponseContract ?? RAW_V2_TOOL_RESPONSE_CONTRACT,
|
|
4071
|
+
toolResponseReceiptRevision: normalizeToolResponseReceiptRevision(
|
|
4072
|
+
input?.toolResponseReceiptRevision ?? RAW_V2_TOOL_RESPONSE_RECEIPT_REVISION
|
|
4073
|
+
)
|
|
4034
4074
|
};
|
|
4035
4075
|
}
|
|
4036
4076
|
|
|
@@ -5339,7 +5379,7 @@ function validatePlaySourceFilesHaveNoInlineSecrets(sourceFiles) {
|
|
|
5339
5379
|
var MAX_PLAY_BUNDLE_BYTES = 30 * 1024 * 1024;
|
|
5340
5380
|
|
|
5341
5381
|
// ../shared_libs/plays/bundling/index.ts
|
|
5342
|
-
var PLAY_BUNDLE_CACHE_VERSION =
|
|
5382
|
+
var PLAY_BUNDLE_CACHE_VERSION = 36;
|
|
5343
5383
|
var PLAY_ARTIFACT_CACHE_DIR = join(
|
|
5344
5384
|
tmpdir(),
|
|
5345
5385
|
`deepline-play-artifacts-v${PLAY_BUNDLE_CACHE_VERSION}`
|
|
@@ -5817,11 +5857,34 @@ function toolErrorSchemaVersionFromOptions(node, context) {
|
|
|
5817
5857
|
"toolErrorSchemaVersion",
|
|
5818
5858
|
context
|
|
5819
5859
|
);
|
|
5860
|
+
if (schema.kind === "absent") return void 0;
|
|
5820
5861
|
if (schema.kind !== "found") return null;
|
|
5821
5862
|
const schemaVersion = staticNumberFromExpression(schema.value, context);
|
|
5822
5863
|
if (schemaVersion === 0 || schemaVersion === 1) return schemaVersion;
|
|
5823
5864
|
return null;
|
|
5824
5865
|
}
|
|
5866
|
+
function toolResponseReceiptRevisionFromOptions(node, context) {
|
|
5867
|
+
const directCompatibility = resolveStaticProperty(
|
|
5868
|
+
node,
|
|
5869
|
+
"compatibility",
|
|
5870
|
+
context
|
|
5871
|
+
);
|
|
5872
|
+
if (directCompatibility.kind === "unknown") return null;
|
|
5873
|
+
const bindings = resolveStaticProperty(node, "bindings", context);
|
|
5874
|
+
if (bindings.kind === "unknown") return null;
|
|
5875
|
+
const bindingCompatibility = bindings.kind === "found" ? resolveStaticProperty(bindings.value, "compatibility", context) : { kind: "absent" };
|
|
5876
|
+
if (bindingCompatibility.kind === "unknown") return null;
|
|
5877
|
+
const compatibility = directCompatibility.kind === "found" ? directCompatibility : bindingCompatibility;
|
|
5878
|
+
if (compatibility.kind === "absent") return void 0;
|
|
5879
|
+
const revision = resolveStaticProperty(
|
|
5880
|
+
compatibility.value,
|
|
5881
|
+
"toolResponseReceiptRevision",
|
|
5882
|
+
context
|
|
5883
|
+
);
|
|
5884
|
+
if (revision.kind === "absent") return void 0;
|
|
5885
|
+
if (revision.kind !== "found") return null;
|
|
5886
|
+
return staticStringFromExpression(revision.value, context);
|
|
5887
|
+
}
|
|
5825
5888
|
function sandboxRuntimeDeclarationFromOptions(node, context) {
|
|
5826
5889
|
const directRuntime = resolveStaticProperty(node, "runtime", context);
|
|
5827
5890
|
const bindings = resolveStaticProperty(node, "bindings", context);
|
|
@@ -5922,7 +5985,12 @@ function playMetadataFromDefinePlayCall(node, context) {
|
|
|
5922
5985
|
context
|
|
5923
5986
|
);
|
|
5924
5987
|
const toolErrorSchemaVersionUnknown = toolErrorSchemaVersion === null;
|
|
5925
|
-
|
|
5988
|
+
const toolResponseReceiptRevision = toolResponseReceiptRevisionFromOptions(
|
|
5989
|
+
options,
|
|
5990
|
+
context
|
|
5991
|
+
);
|
|
5992
|
+
const toolResponseReceiptRevisionUnknown = toolResponseReceiptRevision === null;
|
|
5993
|
+
if (!name && !description && toolErrorSchemaVersion === void 0 && !toolErrorSchemaVersionUnknown && toolResponseReceiptRevision === void 0 && !toolResponseReceiptRevisionUnknown) {
|
|
5926
5994
|
return null;
|
|
5927
5995
|
}
|
|
5928
5996
|
return {
|
|
@@ -5930,7 +5998,9 @@ function playMetadataFromDefinePlayCall(node, context) {
|
|
|
5930
5998
|
description,
|
|
5931
5999
|
sandboxRuntimeDeclaration,
|
|
5932
6000
|
toolErrorSchemaVersion: toolErrorSchemaVersion ?? null,
|
|
5933
|
-
toolErrorSchemaVersionUnknown
|
|
6001
|
+
toolErrorSchemaVersionUnknown,
|
|
6002
|
+
toolResponseReceiptRevision: toolResponseReceiptRevision ?? null,
|
|
6003
|
+
toolResponseReceiptRevisionUnknown
|
|
5934
6004
|
};
|
|
5935
6005
|
}
|
|
5936
6006
|
function resolveExportExpression(exportName, context) {
|
|
@@ -6525,6 +6595,11 @@ async function analyzeSourceGraph(entryFile, adapter, exportName) {
|
|
|
6525
6595
|
"definePlay compatibility.toolErrorSchemaVersion must be the static literal 0 or 1."
|
|
6526
6596
|
);
|
|
6527
6597
|
}
|
|
6598
|
+
if (metadata?.toolResponseReceiptRevisionUnknown) {
|
|
6599
|
+
throw new Error(
|
|
6600
|
+
"definePlay compatibility.toolResponseReceiptRevision must be a static non-empty string."
|
|
6601
|
+
);
|
|
6602
|
+
}
|
|
6528
6603
|
const playName = metadata?.name ?? null;
|
|
6529
6604
|
const playDescription = metadata?.description ?? null;
|
|
6530
6605
|
const sandboxRuntimeDeclaration = metadata?.sandboxRuntimeDeclaration ?? null;
|
|
@@ -6546,6 +6621,7 @@ async function analyzeSourceGraph(entryFile, adapter, exportName) {
|
|
|
6546
6621
|
playDescription,
|
|
6547
6622
|
sandboxRuntimeDeclaration,
|
|
6548
6623
|
toolErrorSchemaVersion: metadata?.toolErrorSchemaVersion ?? null,
|
|
6624
|
+
toolResponseReceiptRevision: metadata?.toolResponseReceiptRevision ?? null,
|
|
6549
6625
|
importedPlayDependencies: [...importedPlayDependencies.values()].sort(
|
|
6550
6626
|
(left, right) => left.filePath.localeCompare(right.filePath)
|
|
6551
6627
|
)
|
|
@@ -6748,7 +6824,8 @@ authoring-contract-edition:${PLAY_AUTHORING_CONTRACT_EDITION}`
|
|
|
6748
6824
|
sourceHash: analysis.sourceHash,
|
|
6749
6825
|
importPolicy,
|
|
6750
6826
|
compatibility: buildPlayContractCompatibility({
|
|
6751
|
-
toolErrorSchemaVersion: analysis.toolErrorSchemaVersion ?? void 0
|
|
6827
|
+
toolErrorSchemaVersion: analysis.toolErrorSchemaVersion ?? void 0,
|
|
6828
|
+
toolResponseReceiptRevision: analysis.toolResponseReceiptRevision ?? void 0
|
|
6752
6829
|
}),
|
|
6753
6830
|
cacheHit: true
|
|
6754
6831
|
},
|
|
@@ -6812,7 +6889,8 @@ authoring-contract-edition:${PLAY_AUTHORING_CONTRACT_EDITION}`
|
|
|
6812
6889
|
sourceMap: normalizedSourceMap,
|
|
6813
6890
|
importPolicy,
|
|
6814
6891
|
compatibility: buildPlayContractCompatibility({
|
|
6815
|
-
toolErrorSchemaVersion: analysis.toolErrorSchemaVersion ?? void 0
|
|
6892
|
+
toolErrorSchemaVersion: analysis.toolErrorSchemaVersion ?? void 0,
|
|
6893
|
+
toolResponseReceiptRevision: analysis.toolResponseReceiptRevision ?? void 0
|
|
6816
6894
|
}),
|
|
6817
6895
|
generatedAt: Date.now(),
|
|
6818
6896
|
cacheHit: false
|