@defend-tech/opencode-optima 0.1.44 → 0.1.46
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 +79 -16
- package/dist/sanitize_cli.js +79 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9564,25 +9564,60 @@ function clearClickUpPendingSessionMetadata(metadata, metadataKey) {
|
|
|
9564
9564
|
return JSON.stringify(sortJsonValue(root), null, 2);
|
|
9565
9565
|
}
|
|
9566
9566
|
async function openCodeSessionExists(client, sessionId) {
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
|
|
9567
|
+
const getAttempts = [
|
|
9568
|
+
{ path: { id: sessionId } },
|
|
9569
|
+
{ path: { sessionID: sessionId } },
|
|
9570
|
+
{ sessionID: sessionId },
|
|
9571
|
+
{ id: sessionId }
|
|
9572
|
+
];
|
|
9573
|
+
if (typeof client?.session?.get === "function") {
|
|
9574
|
+
for (const attempt of getAttempts) {
|
|
9575
|
+
try {
|
|
9576
|
+
await client.session.get(attempt);
|
|
9577
|
+
return true;
|
|
9578
|
+
} catch {
|
|
9579
|
+
}
|
|
9571
9580
|
}
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9581
|
+
}
|
|
9582
|
+
const messageAttempts = [
|
|
9583
|
+
{ path: { id: sessionId }, query: { limit: 1 } },
|
|
9584
|
+
{ path: { sessionID: sessionId }, query: { limit: 1 } },
|
|
9585
|
+
{ sessionID: sessionId, limit: 1 },
|
|
9586
|
+
{ id: sessionId, limit: 1 }
|
|
9587
|
+
];
|
|
9588
|
+
if (typeof client?.session?.messages === "function") {
|
|
9589
|
+
for (const attempt of messageAttempts) {
|
|
9590
|
+
try {
|
|
9591
|
+
await client.session.messages(attempt);
|
|
9592
|
+
return true;
|
|
9593
|
+
} catch {
|
|
9594
|
+
}
|
|
9575
9595
|
}
|
|
9576
|
-
} catch {
|
|
9577
|
-
return false;
|
|
9578
9596
|
}
|
|
9579
9597
|
return false;
|
|
9580
9598
|
}
|
|
9599
|
+
function extractOpenCodeSessionId(result) {
|
|
9600
|
+
const data = result?.data ?? result;
|
|
9601
|
+
return data?.id || data?.sessionID || data?.sessionId || result?.id || result?.sessionID || result?.sessionId;
|
|
9602
|
+
}
|
|
9581
9603
|
async function createOpenCodeSession(client, { title, directory, agent } = {}) {
|
|
9604
|
+
const flatPayload = { directory, title };
|
|
9605
|
+
if (agent) flatPayload.agent = agent;
|
|
9582
9606
|
const body = { title };
|
|
9583
9607
|
if (agent) body.agent = agent;
|
|
9584
|
-
const
|
|
9585
|
-
|
|
9608
|
+
const attempts = [{ query: { directory }, body }, flatPayload];
|
|
9609
|
+
let firstError = null;
|
|
9610
|
+
for (const attempt of attempts) {
|
|
9611
|
+
try {
|
|
9612
|
+
const result = await client.session.create(attempt);
|
|
9613
|
+
const sessionId = extractOpenCodeSessionId(result);
|
|
9614
|
+
if (sessionId) return sessionId;
|
|
9615
|
+
firstError ??= new Error("OpenCode session create response did not include a session id.");
|
|
9616
|
+
} catch (error) {
|
|
9617
|
+
firstError ??= error;
|
|
9618
|
+
}
|
|
9619
|
+
}
|
|
9620
|
+
throw firstError || new Error("OpenCode session create failed.");
|
|
9586
9621
|
}
|
|
9587
9622
|
function assertOpenCodePromptAccepted(result) {
|
|
9588
9623
|
const status = Number(result?.status || result?.response?.status || result?.error?.status || 0);
|
|
@@ -9663,21 +9698,49 @@ async function sendOpenCodeSessionEventDirect({ baseUrl, sessionId, text, agent,
|
|
|
9663
9698
|
}
|
|
9664
9699
|
throw firstError || new Error("OpenCode direct prompt delivery failed.");
|
|
9665
9700
|
}
|
|
9701
|
+
async function callOpenCodePromptWithFallbacks(method, sessionId, flatPayload, structuredPayload) {
|
|
9702
|
+
const attempts = [
|
|
9703
|
+
{ ...structuredPayload, path: { id: sessionId } },
|
|
9704
|
+
{ ...structuredPayload, path: { sessionID: sessionId } },
|
|
9705
|
+
{ sessionID: sessionId, ...flatPayload },
|
|
9706
|
+
{ id: sessionId, ...flatPayload }
|
|
9707
|
+
];
|
|
9708
|
+
let firstError = null;
|
|
9709
|
+
for (const attempt of attempts) {
|
|
9710
|
+
try {
|
|
9711
|
+
return assertOpenCodePromptAccepted(await method(attempt));
|
|
9712
|
+
} catch (error) {
|
|
9713
|
+
firstError ??= error;
|
|
9714
|
+
}
|
|
9715
|
+
}
|
|
9716
|
+
throw firstError;
|
|
9717
|
+
}
|
|
9666
9718
|
async function sendOpenCodeSessionEvent(client, { sessionId, agent, text, directory, opencodeBaseUrl, baseUrl, fetchImpl, direct = false } = {}) {
|
|
9667
9719
|
const directBaseUrl = opencodeBaseUrl || baseUrl;
|
|
9668
9720
|
const parts = [{ type: "text", text }];
|
|
9721
|
+
const flatPayload = { directory, agent, parts };
|
|
9669
9722
|
const structuredPayload = {
|
|
9670
9723
|
path: { id: sessionId },
|
|
9671
9724
|
query: { directory },
|
|
9672
9725
|
body: { agent, parts }
|
|
9673
9726
|
};
|
|
9727
|
+
let firstError = null;
|
|
9674
9728
|
if (!direct && typeof client?.session?.promptAsync === "function") {
|
|
9675
|
-
|
|
9729
|
+
try {
|
|
9730
|
+
return await callOpenCodePromptWithFallbacks(client.session.promptAsync.bind(client.session), sessionId, flatPayload, structuredPayload);
|
|
9731
|
+
} catch (error) {
|
|
9732
|
+
firstError ??= error;
|
|
9733
|
+
}
|
|
9676
9734
|
}
|
|
9677
9735
|
if (!direct && typeof client?.session?.prompt === "function") {
|
|
9678
|
-
|
|
9736
|
+
try {
|
|
9737
|
+
return await callOpenCodePromptWithFallbacks(client.session.prompt.bind(client.session), sessionId, flatPayload, structuredPayload);
|
|
9738
|
+
} catch (error) {
|
|
9739
|
+
firstError ??= error;
|
|
9740
|
+
}
|
|
9679
9741
|
}
|
|
9680
9742
|
if (directBaseUrl) return sendOpenCodeSessionEventDirect({ baseUrl: directBaseUrl, sessionId, text, agent, fetchImpl });
|
|
9743
|
+
if (firstError) throw firstError;
|
|
9681
9744
|
throw new Error("OpenCode client does not expose session.prompt or session.promptAsync.");
|
|
9682
9745
|
}
|
|
9683
9746
|
function normalizeOpenCodeSessionMessages(result) {
|
|
@@ -9692,8 +9755,8 @@ async function readOpenCodeSessionMessages(client, { sessionId, limit = 20 } = {
|
|
|
9692
9755
|
const attempts = [
|
|
9693
9756
|
{ path: { id: sessionId }, query: { limit } },
|
|
9694
9757
|
{ path: { sessionID: sessionId }, query: { limit } },
|
|
9695
|
-
{
|
|
9696
|
-
{
|
|
9758
|
+
{ sessionID: sessionId, limit },
|
|
9759
|
+
{ id: sessionId, limit }
|
|
9697
9760
|
];
|
|
9698
9761
|
let firstError = null;
|
|
9699
9762
|
for (const attempt of attempts) {
|
|
@@ -12007,7 +12070,7 @@ Follow-up: use optima_prompt_workflow with session_id '${sessionId}' to check in
|
|
|
12007
12070
|
}
|
|
12008
12071
|
};
|
|
12009
12072
|
}
|
|
12010
|
-
OptimaPlugin.__internals = { BUNDLE_AGENTS_DIR, BUNDLE_ASSETS_DIR, CLICKUP_DEFINITION_DOC_PARENT, activeClickUpWebhookLifecycleRegistry, cleanupManagedClickUpWebhook, deleteClickUpWebhookBestEffort, BUNDLE_POLICIES_DIR, buildClickUpApplyPayloadResult, buildClickUpCreateSubtasksPayload, buildClickUpStartTaskPayload, buildClickUpSummaryPayload, buildClickUpTransitionPayload, buildOptimaAgents, clickUpCommentLedgerKey, clickUpCommentMentionsProductManager, clickUpWebhookAuditLogDir, clickUpWebhookAuditLogPath, createClickUpApiClient, deliveryEvidencePathForClickUpTask, ensureClickUpTaskWorktree, ensureClickUpWebhookSubscription, handleClickUpWebhookRequest, isClickUpWebhookStateActive, normalizeClickUpWebhookConfig, normalizeClickUpWebhookLogLevel, normalizeOpenCodeBaseUrl, readClickUpCommentLedger, readClickUpWebhookState, reconcileClickUpStartup, recordClickUpCommentVersionProcessed, resyncClickUpWebhookForSignatureDrift, resolveOptimaPluginOptions, resolveSecretReference, routeClickUpWebhookEvent, sendOpenCodeSessionEvent, sendOpenCodeSessionEventDirect, verifyOpenCodeSessionEventDelivery, stableClickUpCommentVersionMarker, startClickUpWebhookListener, validateClickUpWebhookState, verifyClickUpSignature, writeClickUpWebhookState, decideClickUpStatusAction, deriveClickUpBranchName, deriveClickUpPendingSubtaskBranch, deriveClickUpPrTarget, deriveClickUpWorktree, determineClickUpMergeAuthority, ensureOptimaGitignoreRules, explicitSafeInputWorktree, finalApprovalAssignees, formatValidationResult, isIgnoredClickUpTaskType, isOptimaPluginPackageWorktree, isSafeWritableDirectory, loadHumansRegistry, mergeClickUpAgentMetadata, mergeClickUpSessionMetadata, migrateLegacyOptimaLayout, normalizeAgentMetadataJson, normalizeClickUpStatus, normalizeClickUpTaskType, normalizePromptResponseParts, normalizeWorkflowTaskPath, parseClickUpSubtasksMarkdown, parseHumansRegistry, parseMarkdownArtifact, parseMarkdownSections, preEstimateClickUpWork, readMarkdownArtifact, resolveHumanRoles, resolveSafeWorktree, safeWorktreeOrFailure, stripRawLogSections, validateMainWorkspaceBranchSafety, workflowFinalMessageFromPromptResponse };
|
|
12073
|
+
OptimaPlugin.__internals = { BUNDLE_AGENTS_DIR, BUNDLE_ASSETS_DIR, CLICKUP_DEFINITION_DOC_PARENT, activeClickUpWebhookLifecycleRegistry, cleanupManagedClickUpWebhook, deleteClickUpWebhookBestEffort, BUNDLE_POLICIES_DIR, buildClickUpApplyPayloadResult, buildClickUpCreateSubtasksPayload, buildClickUpStartTaskPayload, buildClickUpSummaryPayload, buildClickUpTransitionPayload, buildOptimaAgents, clickUpCommentLedgerKey, clickUpCommentMentionsProductManager, clickUpWebhookAuditLogDir, clickUpWebhookAuditLogPath, createClickUpApiClient, createOpenCodeSession, deliveryEvidencePathForClickUpTask, ensureClickUpTaskWorktree, ensureClickUpWebhookSubscription, handleClickUpWebhookRequest, isClickUpWebhookStateActive, normalizeClickUpWebhookConfig, normalizeClickUpWebhookLogLevel, normalizeOpenCodeBaseUrl, openCodeSessionExists, readClickUpCommentLedger, readClickUpWebhookState, readOpenCodeSessionMessages, reconcileClickUpStartup, recordClickUpCommentVersionProcessed, resyncClickUpWebhookForSignatureDrift, resolveOptimaPluginOptions, resolveSecretReference, routeClickUpWebhookEvent, sendOpenCodeSessionEvent, sendOpenCodeSessionEventDirect, verifyOpenCodeSessionEventDelivery, stableClickUpCommentVersionMarker, startClickUpWebhookListener, validateClickUpWebhookState, verifyClickUpSignature, writeClickUpWebhookState, decideClickUpStatusAction, deriveClickUpBranchName, deriveClickUpPendingSubtaskBranch, deriveClickUpPrTarget, deriveClickUpWorktree, determineClickUpMergeAuthority, ensureOptimaGitignoreRules, explicitSafeInputWorktree, finalApprovalAssignees, formatValidationResult, isIgnoredClickUpTaskType, isOptimaPluginPackageWorktree, isSafeWritableDirectory, loadHumansRegistry, mergeClickUpAgentMetadata, mergeClickUpSessionMetadata, migrateLegacyOptimaLayout, normalizeAgentMetadataJson, normalizeClickUpStatus, normalizeClickUpTaskType, normalizePromptResponseParts, normalizeWorkflowTaskPath, parseClickUpSubtasksMarkdown, parseHumansRegistry, parseMarkdownArtifact, parseMarkdownSections, preEstimateClickUpWork, readMarkdownArtifact, resolveHumanRoles, resolveSafeWorktree, safeWorktreeOrFailure, stripRawLogSections, validateMainWorkspaceBranchSafety, workflowFinalMessageFromPromptResponse };
|
|
12011
12074
|
export {
|
|
12012
12075
|
OptimaPlugin as default
|
|
12013
12076
|
};
|
package/dist/sanitize_cli.js
CHANGED
|
@@ -9571,25 +9571,60 @@ function clearClickUpPendingSessionMetadata(metadata, metadataKey) {
|
|
|
9571
9571
|
return JSON.stringify(sortJsonValue(root), null, 2);
|
|
9572
9572
|
}
|
|
9573
9573
|
async function openCodeSessionExists(client, sessionId) {
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9574
|
+
const getAttempts = [
|
|
9575
|
+
{ path: { id: sessionId } },
|
|
9576
|
+
{ path: { sessionID: sessionId } },
|
|
9577
|
+
{ sessionID: sessionId },
|
|
9578
|
+
{ id: sessionId }
|
|
9579
|
+
];
|
|
9580
|
+
if (typeof client?.session?.get === "function") {
|
|
9581
|
+
for (const attempt of getAttempts) {
|
|
9582
|
+
try {
|
|
9583
|
+
await client.session.get(attempt);
|
|
9584
|
+
return true;
|
|
9585
|
+
} catch {
|
|
9586
|
+
}
|
|
9578
9587
|
}
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9588
|
+
}
|
|
9589
|
+
const messageAttempts = [
|
|
9590
|
+
{ path: { id: sessionId }, query: { limit: 1 } },
|
|
9591
|
+
{ path: { sessionID: sessionId }, query: { limit: 1 } },
|
|
9592
|
+
{ sessionID: sessionId, limit: 1 },
|
|
9593
|
+
{ id: sessionId, limit: 1 }
|
|
9594
|
+
];
|
|
9595
|
+
if (typeof client?.session?.messages === "function") {
|
|
9596
|
+
for (const attempt of messageAttempts) {
|
|
9597
|
+
try {
|
|
9598
|
+
await client.session.messages(attempt);
|
|
9599
|
+
return true;
|
|
9600
|
+
} catch {
|
|
9601
|
+
}
|
|
9582
9602
|
}
|
|
9583
|
-
} catch {
|
|
9584
|
-
return false;
|
|
9585
9603
|
}
|
|
9586
9604
|
return false;
|
|
9587
9605
|
}
|
|
9606
|
+
function extractOpenCodeSessionId(result) {
|
|
9607
|
+
const data = result?.data ?? result;
|
|
9608
|
+
return data?.id || data?.sessionID || data?.sessionId || result?.id || result?.sessionID || result?.sessionId;
|
|
9609
|
+
}
|
|
9588
9610
|
async function createOpenCodeSession(client, { title, directory, agent } = {}) {
|
|
9611
|
+
const flatPayload = { directory, title };
|
|
9612
|
+
if (agent) flatPayload.agent = agent;
|
|
9589
9613
|
const body = { title };
|
|
9590
9614
|
if (agent) body.agent = agent;
|
|
9591
|
-
const
|
|
9592
|
-
|
|
9615
|
+
const attempts = [{ query: { directory }, body }, flatPayload];
|
|
9616
|
+
let firstError = null;
|
|
9617
|
+
for (const attempt of attempts) {
|
|
9618
|
+
try {
|
|
9619
|
+
const result = await client.session.create(attempt);
|
|
9620
|
+
const sessionId = extractOpenCodeSessionId(result);
|
|
9621
|
+
if (sessionId) return sessionId;
|
|
9622
|
+
firstError ??= new Error("OpenCode session create response did not include a session id.");
|
|
9623
|
+
} catch (error) {
|
|
9624
|
+
firstError ??= error;
|
|
9625
|
+
}
|
|
9626
|
+
}
|
|
9627
|
+
throw firstError || new Error("OpenCode session create failed.");
|
|
9593
9628
|
}
|
|
9594
9629
|
function assertOpenCodePromptAccepted(result) {
|
|
9595
9630
|
const status = Number(result?.status || result?.response?.status || result?.error?.status || 0);
|
|
@@ -9670,21 +9705,49 @@ async function sendOpenCodeSessionEventDirect({ baseUrl, sessionId, text, agent,
|
|
|
9670
9705
|
}
|
|
9671
9706
|
throw firstError || new Error("OpenCode direct prompt delivery failed.");
|
|
9672
9707
|
}
|
|
9708
|
+
async function callOpenCodePromptWithFallbacks(method, sessionId, flatPayload, structuredPayload) {
|
|
9709
|
+
const attempts = [
|
|
9710
|
+
{ ...structuredPayload, path: { id: sessionId } },
|
|
9711
|
+
{ ...structuredPayload, path: { sessionID: sessionId } },
|
|
9712
|
+
{ sessionID: sessionId, ...flatPayload },
|
|
9713
|
+
{ id: sessionId, ...flatPayload }
|
|
9714
|
+
];
|
|
9715
|
+
let firstError = null;
|
|
9716
|
+
for (const attempt of attempts) {
|
|
9717
|
+
try {
|
|
9718
|
+
return assertOpenCodePromptAccepted(await method(attempt));
|
|
9719
|
+
} catch (error) {
|
|
9720
|
+
firstError ??= error;
|
|
9721
|
+
}
|
|
9722
|
+
}
|
|
9723
|
+
throw firstError;
|
|
9724
|
+
}
|
|
9673
9725
|
async function sendOpenCodeSessionEvent(client, { sessionId, agent, text, directory, opencodeBaseUrl, baseUrl, fetchImpl, direct = false } = {}) {
|
|
9674
9726
|
const directBaseUrl = opencodeBaseUrl || baseUrl;
|
|
9675
9727
|
const parts = [{ type: "text", text }];
|
|
9728
|
+
const flatPayload = { directory, agent, parts };
|
|
9676
9729
|
const structuredPayload = {
|
|
9677
9730
|
path: { id: sessionId },
|
|
9678
9731
|
query: { directory },
|
|
9679
9732
|
body: { agent, parts }
|
|
9680
9733
|
};
|
|
9734
|
+
let firstError = null;
|
|
9681
9735
|
if (!direct && typeof client?.session?.promptAsync === "function") {
|
|
9682
|
-
|
|
9736
|
+
try {
|
|
9737
|
+
return await callOpenCodePromptWithFallbacks(client.session.promptAsync.bind(client.session), sessionId, flatPayload, structuredPayload);
|
|
9738
|
+
} catch (error) {
|
|
9739
|
+
firstError ??= error;
|
|
9740
|
+
}
|
|
9683
9741
|
}
|
|
9684
9742
|
if (!direct && typeof client?.session?.prompt === "function") {
|
|
9685
|
-
|
|
9743
|
+
try {
|
|
9744
|
+
return await callOpenCodePromptWithFallbacks(client.session.prompt.bind(client.session), sessionId, flatPayload, structuredPayload);
|
|
9745
|
+
} catch (error) {
|
|
9746
|
+
firstError ??= error;
|
|
9747
|
+
}
|
|
9686
9748
|
}
|
|
9687
9749
|
if (directBaseUrl) return sendOpenCodeSessionEventDirect({ baseUrl: directBaseUrl, sessionId, text, agent, fetchImpl });
|
|
9750
|
+
if (firstError) throw firstError;
|
|
9688
9751
|
throw new Error("OpenCode client does not expose session.prompt or session.promptAsync.");
|
|
9689
9752
|
}
|
|
9690
9753
|
function normalizeOpenCodeSessionMessages(result) {
|
|
@@ -9699,8 +9762,8 @@ async function readOpenCodeSessionMessages(client, { sessionId, limit = 20 } = {
|
|
|
9699
9762
|
const attempts = [
|
|
9700
9763
|
{ path: { id: sessionId }, query: { limit } },
|
|
9701
9764
|
{ path: { sessionID: sessionId }, query: { limit } },
|
|
9702
|
-
{
|
|
9703
|
-
{
|
|
9765
|
+
{ sessionID: sessionId, limit },
|
|
9766
|
+
{ id: sessionId, limit }
|
|
9704
9767
|
];
|
|
9705
9768
|
let firstError = null;
|
|
9706
9769
|
for (const attempt of attempts) {
|
|
@@ -12014,7 +12077,7 @@ Follow-up: use optima_prompt_workflow with session_id '${sessionId}' to check in
|
|
|
12014
12077
|
}
|
|
12015
12078
|
};
|
|
12016
12079
|
}
|
|
12017
|
-
OptimaPlugin.__internals = { BUNDLE_AGENTS_DIR, BUNDLE_ASSETS_DIR, CLICKUP_DEFINITION_DOC_PARENT, activeClickUpWebhookLifecycleRegistry, cleanupManagedClickUpWebhook, deleteClickUpWebhookBestEffort, BUNDLE_POLICIES_DIR, buildClickUpApplyPayloadResult, buildClickUpCreateSubtasksPayload, buildClickUpStartTaskPayload, buildClickUpSummaryPayload, buildClickUpTransitionPayload, buildOptimaAgents, clickUpCommentLedgerKey, clickUpCommentMentionsProductManager, clickUpWebhookAuditLogDir, clickUpWebhookAuditLogPath, createClickUpApiClient, deliveryEvidencePathForClickUpTask, ensureClickUpTaskWorktree, ensureClickUpWebhookSubscription, handleClickUpWebhookRequest, isClickUpWebhookStateActive, normalizeClickUpWebhookConfig, normalizeClickUpWebhookLogLevel, normalizeOpenCodeBaseUrl, readClickUpCommentLedger, readClickUpWebhookState, reconcileClickUpStartup, recordClickUpCommentVersionProcessed, resyncClickUpWebhookForSignatureDrift, resolveOptimaPluginOptions, resolveSecretReference, routeClickUpWebhookEvent, sendOpenCodeSessionEvent, sendOpenCodeSessionEventDirect, verifyOpenCodeSessionEventDelivery, stableClickUpCommentVersionMarker, startClickUpWebhookListener, validateClickUpWebhookState, verifyClickUpSignature, writeClickUpWebhookState, decideClickUpStatusAction, deriveClickUpBranchName, deriveClickUpPendingSubtaskBranch, deriveClickUpPrTarget, deriveClickUpWorktree, determineClickUpMergeAuthority, ensureOptimaGitignoreRules, explicitSafeInputWorktree, finalApprovalAssignees, formatValidationResult, isIgnoredClickUpTaskType, isOptimaPluginPackageWorktree, isSafeWritableDirectory, loadHumansRegistry, mergeClickUpAgentMetadata, mergeClickUpSessionMetadata, migrateLegacyOptimaLayout, normalizeAgentMetadataJson, normalizeClickUpStatus, normalizeClickUpTaskType, normalizePromptResponseParts, normalizeWorkflowTaskPath, parseClickUpSubtasksMarkdown, parseHumansRegistry, parseMarkdownArtifact, parseMarkdownSections, preEstimateClickUpWork, readMarkdownArtifact, resolveHumanRoles, resolveSafeWorktree, safeWorktreeOrFailure, stripRawLogSections, validateMainWorkspaceBranchSafety, workflowFinalMessageFromPromptResponse };
|
|
12080
|
+
OptimaPlugin.__internals = { BUNDLE_AGENTS_DIR, BUNDLE_ASSETS_DIR, CLICKUP_DEFINITION_DOC_PARENT, activeClickUpWebhookLifecycleRegistry, cleanupManagedClickUpWebhook, deleteClickUpWebhookBestEffort, BUNDLE_POLICIES_DIR, buildClickUpApplyPayloadResult, buildClickUpCreateSubtasksPayload, buildClickUpStartTaskPayload, buildClickUpSummaryPayload, buildClickUpTransitionPayload, buildOptimaAgents, clickUpCommentLedgerKey, clickUpCommentMentionsProductManager, clickUpWebhookAuditLogDir, clickUpWebhookAuditLogPath, createClickUpApiClient, createOpenCodeSession, deliveryEvidencePathForClickUpTask, ensureClickUpTaskWorktree, ensureClickUpWebhookSubscription, handleClickUpWebhookRequest, isClickUpWebhookStateActive, normalizeClickUpWebhookConfig, normalizeClickUpWebhookLogLevel, normalizeOpenCodeBaseUrl, openCodeSessionExists, readClickUpCommentLedger, readClickUpWebhookState, readOpenCodeSessionMessages, reconcileClickUpStartup, recordClickUpCommentVersionProcessed, resyncClickUpWebhookForSignatureDrift, resolveOptimaPluginOptions, resolveSecretReference, routeClickUpWebhookEvent, sendOpenCodeSessionEvent, sendOpenCodeSessionEventDirect, verifyOpenCodeSessionEventDelivery, stableClickUpCommentVersionMarker, startClickUpWebhookListener, validateClickUpWebhookState, verifyClickUpSignature, writeClickUpWebhookState, decideClickUpStatusAction, deriveClickUpBranchName, deriveClickUpPendingSubtaskBranch, deriveClickUpPrTarget, deriveClickUpWorktree, determineClickUpMergeAuthority, ensureOptimaGitignoreRules, explicitSafeInputWorktree, finalApprovalAssignees, formatValidationResult, isIgnoredClickUpTaskType, isOptimaPluginPackageWorktree, isSafeWritableDirectory, loadHumansRegistry, mergeClickUpAgentMetadata, mergeClickUpSessionMetadata, migrateLegacyOptimaLayout, normalizeAgentMetadataJson, normalizeClickUpStatus, normalizeClickUpTaskType, normalizePromptResponseParts, normalizeWorkflowTaskPath, parseClickUpSubtasksMarkdown, parseHumansRegistry, parseMarkdownArtifact, parseMarkdownSections, preEstimateClickUpWork, readMarkdownArtifact, resolveHumanRoles, resolveSafeWorktree, safeWorktreeOrFailure, stripRawLogSections, validateMainWorkspaceBranchSafety, workflowFinalMessageFromPromptResponse };
|
|
12018
12081
|
|
|
12019
12082
|
// src/sanitize_cli.js
|
|
12020
12083
|
var { migrateLegacyOptimaLayout: migrateLegacyOptimaLayout2 } = OptimaPlugin.__internals;
|