@ycodium-ai/plugin-team 0.2.4221 → 0.2.4250
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/index.js +22 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ var __export = (target, all3) => {
|
|
|
8
8
|
import { definePlugin } from "@ycodium-ai/plugin-api";
|
|
9
9
|
|
|
10
10
|
// ../../packages/plugin-api/src/version.ts
|
|
11
|
-
var PLUGIN_API_VERSION =
|
|
11
|
+
var PLUGIN_API_VERSION = 103;
|
|
12
12
|
|
|
13
13
|
// ../../node_modules/.pnpm/effect@4.0.0-beta.103_patch_hash=78523ded7c3dfc3efd3cec0247f4960d00eaa3d3c96a2077457694a4d8b453c6/node_modules/effect/dist/Pipeable.js
|
|
14
14
|
var pipeArguments = (self, args2) => {
|
|
@@ -11186,11 +11186,24 @@ function registerDispatchGate(ctx, deps) {
|
|
|
11186
11186
|
return lines.items.length === 0 ? hold("the project's older team goal takes this member in and dispatches it") : allow;
|
|
11187
11187
|
};
|
|
11188
11188
|
const memberThreadsOf = (scope2, memberId) => teamSessions(scope2).filter((threadId) => scope2.memberIds?.[threadId] === memberId);
|
|
11189
|
+
const remoteGate = async (project2, scope2, input) => {
|
|
11190
|
+
if (isLineGated(project2, input.workLineId ?? void 0) || input.workLineId !== null && isMemberPausedOnLine(project2, input.workLineId, input.memberId))
|
|
11191
|
+
return hold("the team is stopped or paused");
|
|
11192
|
+
if (input.reason === "item" && input.workItemId !== null) {
|
|
11193
|
+
const work = readFact(project2.items, input.workItemId);
|
|
11194
|
+
if (work === null) return hold("the team has not seen this work item yet");
|
|
11195
|
+
if (isClosed(work)) return hold("the work item is closed");
|
|
11196
|
+
if (hasOpenBlocker(project2, input.workItemId))
|
|
11197
|
+
return hold("the work item is blocked by unfinished work items");
|
|
11198
|
+
}
|
|
11199
|
+
const isReady2 = await deps.readiness();
|
|
11200
|
+
return isReady2(input.projectId, input.memberId, scope2.goalId) ? allow : hold("the member has not passed its trial run yet");
|
|
11201
|
+
};
|
|
11189
11202
|
const itemGate = async (project2, scope2, input) => {
|
|
11190
11203
|
const workItemId = input.workItemId;
|
|
11191
11204
|
const binding = readFact(scope2.bindings ?? {}, input.memberId);
|
|
11192
11205
|
if (binding === null) return hold(JOINING);
|
|
11193
|
-
if (!("threadId" in binding)) return
|
|
11206
|
+
if (!("threadId" in binding)) return remoteGate(project2, scope2, input);
|
|
11194
11207
|
const lead = scope2.leadThreads?.includes(binding.threadId) === true;
|
|
11195
11208
|
const executor = lead ? { threadId: binding.threadId } : executorOf(project2, workItemId, input.memberId);
|
|
11196
11209
|
if (executor === void 0 || !("threadId" in executor)) return hold(JOINING);
|
|
@@ -11213,7 +11226,7 @@ function registerDispatchGate(ctx, deps) {
|
|
|
11213
11226
|
const messageGate = async (project2, scope2, input) => {
|
|
11214
11227
|
const binding = readFact(scope2.bindings ?? {}, input.memberId);
|
|
11215
11228
|
if (binding === null) return hold(JOINING);
|
|
11216
|
-
if (!("threadId" in binding)) return
|
|
11229
|
+
if (!("threadId" in binding)) return remoteGate(project2, scope2, input);
|
|
11217
11230
|
const threadId = input.threadId !== null && memberThreadsOf(scope2, input.memberId).includes(input.threadId) ? input.threadId : binding.threadId;
|
|
11218
11231
|
const isReady2 = await deps.readiness();
|
|
11219
11232
|
if (!exemptFromTrial(project2, { threadId }, input.workItemId ?? void 0) && !isReady2(input.projectId, input.memberId, scope2.goalId))
|
|
@@ -11234,7 +11247,12 @@ function registerDispatchGate(ctx, deps) {
|
|
|
11234
11247
|
if (project2 === null) return allow;
|
|
11235
11248
|
const scope2 = input.workLineId === null ? void 0 : project2.lineScopes?.[input.workLineId];
|
|
11236
11249
|
if (scope2 === void 0) {
|
|
11237
|
-
if (input.reason === "item")
|
|
11250
|
+
if (input.reason === "item") {
|
|
11251
|
+
const binding = readFact(project2.bindings ?? {}, input.memberId);
|
|
11252
|
+
if (binding !== null && "principalId" in binding)
|
|
11253
|
+
return remoteGate(project2, project2, input);
|
|
11254
|
+
return legacyProjectGoal(project2, input);
|
|
11255
|
+
}
|
|
11238
11256
|
return project2.goalId !== void 0 && readFact(project2.bindings ?? {}, input.memberId) !== null ? messageGate(project2, project2, input) : allow;
|
|
11239
11257
|
}
|
|
11240
11258
|
if (project2.lineStops?.[input.workLineId] !== void 0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/plugin-team",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4250",
|
|
4
4
|
"description": "A project team roster with members, a lead, and goals.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"teams",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"tailwindcss": "^4.0.0",
|
|
35
35
|
"typescript": "~6.0.3",
|
|
36
36
|
"vite-plus": "0.2.2",
|
|
37
|
-
"@ycodium-ai/plugin-api": "0.2.
|
|
37
|
+
"@ycodium-ai/plugin-api": "0.2.4250",
|
|
38
38
|
"ycodium-system-text": "0.0.0"
|
|
39
39
|
},
|
|
40
40
|
"ycodium": {
|