@adaptic/lumic-utils 1.0.17 → 1.0.18
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/{apollo-client.client-NpMY129A.js → apollo-client.client-Cz-ZMwuK.js} +3 -3
- package/dist/{apollo-client.client-NpMY129A.js.map → apollo-client.client-Cz-ZMwuK.js.map} +1 -1
- package/dist/{apollo-client.client-D-B7RKys.js → apollo-client.client-kEvzgHxw.js} +4 -4
- package/dist/{apollo-client.client-D-B7RKys.js.map → apollo-client.client-kEvzgHxw.js.map} +1 -1
- package/dist/{apollo-client.server-CS3TcmzK.js → apollo-client.server-BAuFJqgR.js} +3 -3
- package/dist/{apollo-client.server-CS3TcmzK.js.map → apollo-client.server-BAuFJqgR.js.map} +1 -1
- package/dist/{apollo-client.server-CBdqNKB_.js → apollo-client.server-C2gZgUkR.js} +3 -3
- package/dist/{apollo-client.server-CBdqNKB_.js.map → apollo-client.server-C2gZgUkR.js.map} +1 -1
- package/dist/{index-7awA08-j.js → index-27SewDPi.js} +2 -2
- package/dist/{index-7awA08-j.js.map → index-27SewDPi.js.map} +1 -1
- package/dist/{index-Y9dzs7p_.js → index-C3ihLNel.js} +27 -4
- package/dist/{index-Y9dzs7p_.js.map → index-C3ihLNel.js.map} +1 -1
- package/dist/{index-coRTK6G3.js → index-C_0vRRAD.js} +2 -2
- package/dist/{index-coRTK6G3.js.map → index-C_0vRRAD.js.map} +1 -1
- package/dist/{index-CMRl9Q54.js → index-UQOI_SLD.js} +27 -4
- package/dist/{index-CMRl9Q54.js.map → index-UQOI_SLD.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/test.cjs +1 -1
- package/dist/test.mjs +1 -1
- package/package.json +1 -1
|
@@ -7901,7 +7901,30 @@ function translateContextToAnthropic(context) {
|
|
|
7901
7901
|
continue;
|
|
7902
7902
|
}
|
|
7903
7903
|
}
|
|
7904
|
-
|
|
7904
|
+
// Anthropic requires alternating user/assistant roles — merge consecutive
|
|
7905
|
+
// same-role messages into a single message with combined content blocks.
|
|
7906
|
+
const merged = [];
|
|
7907
|
+
for (const msg of messages) {
|
|
7908
|
+
const prev = merged[merged.length - 1];
|
|
7909
|
+
if (prev && prev.role === msg.role) {
|
|
7910
|
+
// Merge into the previous message by combining content blocks
|
|
7911
|
+
const prevBlocks = toContentBlocks(prev.content);
|
|
7912
|
+
const curBlocks = toContentBlocks(msg.content);
|
|
7913
|
+
prev.content = [...prevBlocks, ...curBlocks];
|
|
7914
|
+
}
|
|
7915
|
+
else {
|
|
7916
|
+
// Ensure content is in block form for consistency (string → TextBlock)
|
|
7917
|
+
merged.push({ role: msg.role, content: toContentBlocks(msg.content) });
|
|
7918
|
+
}
|
|
7919
|
+
}
|
|
7920
|
+
return { messages: merged, systemText: systemParts.join('\n\n') };
|
|
7921
|
+
}
|
|
7922
|
+
/** Convert string or content block array to a uniform content block array. */
|
|
7923
|
+
function toContentBlocks(content) {
|
|
7924
|
+
if (typeof content === 'string') {
|
|
7925
|
+
return [{ type: 'text', text: content }];
|
|
7926
|
+
}
|
|
7927
|
+
return content;
|
|
7905
7928
|
}
|
|
7906
7929
|
/**
|
|
7907
7930
|
* Makes a call to the Anthropic Messages API.
|
|
@@ -22690,11 +22713,11 @@ let poolConfig = DEFAULT_POOL_CONFIG;
|
|
|
22690
22713
|
async function loadApolloModules() {
|
|
22691
22714
|
if (typeof window === "undefined" || process.env.AWS_EXECUTION_ENV) {
|
|
22692
22715
|
// Server-side (or Lambda): load the CommonJS‑based implementation.
|
|
22693
|
-
return (await import('./apollo-client.server-
|
|
22716
|
+
return (await import('./apollo-client.server-C2gZgUkR.js'));
|
|
22694
22717
|
}
|
|
22695
22718
|
else {
|
|
22696
22719
|
// Client-side: load the ESM‑based implementation.
|
|
22697
|
-
return (await import('./apollo-client.client-
|
|
22720
|
+
return (await import('./apollo-client.client-kEvzgHxw.js'));
|
|
22698
22721
|
}
|
|
22699
22722
|
}
|
|
22700
22723
|
/**
|
|
@@ -81218,4 +81241,4 @@ const lumic = {
|
|
|
81218
81241
|
};
|
|
81219
81242
|
|
|
81220
81243
|
export { GraphQLInterfaceType as $, print as A, getNamedType as B, isInputType as C, isRequiredArgument as D, isNamedType as E, GraphQLError as F, GraphQLNonNull as G, isOutputType as H, isRequiredInputField as I, isCompositeType as J, Kind as K, getNullableType as L, getEnterLeaveForKind as M, isNode as N, OperationTypeNode as O, didYouMean as P, naturalCompare as Q, suggestionList as R, specifiedScalarTypes as S, keyMap as T, isType as U, isNullableType as V, visit as W, visitInParallel as X, keyValMap as Y, assertObjectType as Z, GraphQLScalarType as _, isListType as a, validateGoogleSheetsRange as a$, GraphQLUnionType as a0, GraphQLInputObjectType as a1, assertNullableType as a2, assertInterfaceType as a3, mapValue as a4, isSpecifiedScalarType as a5, isPrintableAsBlockString as a6, printBlockString as a7, BREAK as a8, GRAPHQL_MAX_INT as a9, printSourceLocation as aA, resolveObjMapThunk as aB, resolveReadonlyArrayThunk as aC, valueFromASTUntyped as aD, version$4 as aE, versionInfo as aF, getAugmentedNamespace as aG, isDigit$1 as aH, isNameStart as aI, dedentBlockStringLines as aJ, isNameContinue as aK, setLumicLogger as aL, getLumicLogger as aM, sanitizeForLog as aN, sanitizeError as aO, sanitizeAWSAuth as aP, sanitizeObject as aQ, getSecrets as aR, resetSecrets as aS, requireSecret as aT, withRetry as aU, CircuitBreaker as aV, CircuitBreakerState as aW, CircuitBreakerOpenError as aX, DEFAULT_CIRCUIT_BREAKER_CONFIG as aY, validateSlackChannel as aZ, validateS3Key as a_, GRAPHQL_MIN_INT as aa, GraphQLFloat as ab, GraphQLInt as ac, Location as ad, Token as ae, assertAbstractType as af, assertCompositeType as ag, assertEnumType as ah, assertEnumValueName as ai, assertInputObjectType as aj, assertInputType as ak, assertLeafType as al, assertListType as am, assertNamedType as an, assertNonNullType as ao, assertOutputType as ap, assertScalarType as aq, assertType as ar, assertUnionType as as, assertWrappingType as at, formatError as au, getLocation as av, getVisitFn as aw, isWrappingType as ax, printError as ay, printLocation as az, isAbstractType as b, PDFError as b$, LLMCostTracker as b0, getLLMCostTracker as b1, setLLMCostTracker as b2, resetLLMCostTracker as b3, setMetricsCollector as b4, getMetricsCollector as b5, resetMetricsCollector as b6, withMetrics as b7, generateCorrelationId as b8, getCorrelationId as b9, openAIChatCompletionSchema as bA, openAIImageResponseSchema as bB, validateOpenAIChatCompletion as bC, safeValidateOpenAIChatCompletion as bD, perplexityResponseSchema as bE, validatePerplexityResponse as bF, safeValidatePerplexityResponse as bG, googleSheetsValueRangeSchema as bH, validateGoogleSheetsResponse as bI, safeValidateGoogleSheetsResponse as bJ, s3ListObjectsSchema as bK, s3GetObjectSchema as bL, lambdaInvokeResponseSchema as bM, validateS3ListObjects as bN, safeValidateS3ListObjects as bO, validateLambdaResponse as bP, safeValidateLambdaResponse as bQ, createValidator as bR, createSafeValidator as bS, LumicError as bT, SlackError as bU, LLMError as bV, AWSLambdaError as bW, AWSS3Error as bX, GoogleSheetsError as bY, PerplexityError as bZ, JsonParseError as b_, getCorrelationContext as ba, withCorrelationId as bb, getCorrelationHeaders as bc, TokenBucketRateLimiter as bd, RATE_LIMIT_PROFILES as be, getRateLimiter as bf, resetAllRateLimiters as bg, withRateLimit as bh, checkIntegrationHealth as bi, SUPPORTED_MODELS as bj, isValidModel as bk, getModelCapabilities as bl, getModelProvider as bm, MODEL_ALIASES as bn, OPENAI_COMPATIBLE_PROVIDERS as bo, PROVIDER_DEFAULT_MODELS as bp, LLM_DEFAULT_PROVIDER as bq, LLM_MINI_PROVIDER as br, LLM_NORMAL_PROVIDER as bs, LLM_ADVANCED_PROVIDER as bt, LLM_PROVIDER as bu, LLM_MODEL_MINI as bv, LLM_MODEL_NORMAL as bw, LLM_MODEL_ADVANCED as bx, makeAnthropicCall as by, makeOpenAICompatibleCall as bz, isInterfaceType as c, ZipError as c0, SLACK_TIMEOUT_MS as c1, PERPLEXITY_TIMEOUT_MS as c2, GOOGLE_SHEETS_TIMEOUT_MS as c3, LLM_TIMEOUT_MS as c4, AWS_LAMBDA_TIMEOUT_MS as c5, AWS_S3_TIMEOUT_MS as c6, OPENWEATHER_TIMEOUT_MS as c7, GENERIC_FETCH_TIMEOUT_MS as c8, isObjectType as d, assertName as e, devAssert as f, isObjectLike as g, defineArguments as h, isNonNullType as i, argsToArgsConfig as j, GraphQLBoolean as k, lumic as l, GraphQLString as m, instanceOf as n, inspect as o, isInputObjectType as p, isLeafType as q, isEnumType as r, GraphQLID as s, toObjMap as t, invariant as u, GraphQLObjectType as v, GraphQLEnumType as w, GraphQLList as x, isScalarType as y, isUnionType as z };
|
|
81221
|
-
//# sourceMappingURL=index-
|
|
81244
|
+
//# sourceMappingURL=index-UQOI_SLD.js.map
|