@axiom-lattice/protocols 4.6.0 → 4.6.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/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +30 -1
- package/dist/index.d.ts +30 -1
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/RunScope.ts +44 -0
- package/src/__tests__/RunScope.test.ts +38 -0
- package/src/index.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -922,6 +922,21 @@ function parseQueuedExecutionMode(value) {
|
|
|
922
922
|
return value;
|
|
923
923
|
}
|
|
924
924
|
|
|
925
|
+
// src/RunScope.ts
|
|
926
|
+
function firstNonEmptyString(...values) {
|
|
927
|
+
for (const value of values) {
|
|
928
|
+
if (typeof value === "string" && value.length > 0) return value;
|
|
929
|
+
}
|
|
930
|
+
return void 0;
|
|
931
|
+
}
|
|
932
|
+
function resolveRunScope(runConfig) {
|
|
933
|
+
const rc = runConfig && typeof runConfig === "object" && !Array.isArray(runConfig) ? runConfig : {};
|
|
934
|
+
return {
|
|
935
|
+
workspaceId: firstNonEmptyString(rc.workspaceId, rc["x-workspace-id"]),
|
|
936
|
+
projectId: firstNonEmptyString(rc.projectId, rc["x-project-id"])
|
|
937
|
+
};
|
|
938
|
+
}
|
|
939
|
+
|
|
925
940
|
// src/OpenProtocol.ts
|
|
926
941
|
function effectiveGrants(record) {
|
|
927
942
|
if (record.grants && record.grants.length > 0) return record.grants;
|
|
@@ -986,6 +1001,7 @@ export {
|
|
|
986
1001
|
createAgentWebAppStreamProjectionContext,
|
|
987
1002
|
descriptorDataValue,
|
|
988
1003
|
effectiveGrants,
|
|
1004
|
+
firstNonEmptyString,
|
|
989
1005
|
getSubAgentsFromConfig,
|
|
990
1006
|
getToolsFromConfig,
|
|
991
1007
|
hasTools,
|
|
@@ -1010,6 +1026,7 @@ export {
|
|
|
1010
1026
|
projectRoomUserEventScope,
|
|
1011
1027
|
replaceTaskBeliefState,
|
|
1012
1028
|
requireProjectTaskWorkItemStore,
|
|
1029
|
+
resolveRunScope,
|
|
1013
1030
|
snapshotExactArray,
|
|
1014
1031
|
snapshotExactRecord,
|
|
1015
1032
|
snapshotProjectRoomBotMembershipRealtime,
|