@skaile/workspaces 1.10.0 → 1.10.2
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/CHANGELOG.md +37 -0
- package/dist/bridge/drivers/claude-sdk.js +1 -1
- package/dist/bridge/drivers/codex.js +1 -1
- package/dist/bridge/drivers/continue.js +2 -2
- package/dist/bridge/drivers/echo.js +2 -2
- package/dist/bridge/drivers/echo.js.map +1 -1
- package/dist/bridge/drivers/gemini.js +3 -3
- package/dist/bridge/drivers/goose.js +2 -2
- package/dist/bridge/drivers/omp.js +1 -1
- package/dist/bridge/drivers/opencode.js +2 -2
- package/dist/bridge/drivers/qwen.js +3 -3
- package/dist/bridge/index.js +2 -2
- package/dist/bridge/src/drivers/echo.d.ts.map +1 -1
- package/dist/{chunk-DEBMR6MK.js → chunk-EAJWXVQL.js} +2 -2
- package/dist/{chunk-DEBMR6MK.js.map → chunk-EAJWXVQL.js.map} +1 -1
- package/dist/{chunk-YNEJXDCZ.js → chunk-JLJ3OMHR.js} +93 -18
- package/dist/chunk-JLJ3OMHR.js.map +1 -0
- package/dist/{chunk-APHTT5GE.js → chunk-KF3KDVKT.js} +2 -2
- package/dist/{chunk-APHTT5GE.js.map → chunk-KF3KDVKT.js.map} +1 -1
- package/dist/{chunk-6XQ5QG63.js → chunk-NQD7INSF.js} +4 -4
- package/dist/{chunk-6XQ5QG63.js.map → chunk-NQD7INSF.js.map} +1 -1
- package/dist/{chunk-LVQO4X4U.js → chunk-T5XXWWHT.js} +3 -3
- package/dist/{chunk-LVQO4X4U.js.map → chunk-T5XXWWHT.js.map} +1 -1
- package/dist/{chunk-FRD4NU3W.js → chunk-XVWK3VHH.js} +3 -3
- package/dist/{chunk-FRD4NU3W.js.map → chunk-XVWK3VHH.js.map} +1 -1
- package/dist/cli/index.js +5 -5
- package/dist/factory-assets/connectors/flow/run-flow.js +1 -1
- package/dist/runner/index.js +3 -3
- package/dist/runner/src/serve.d.ts +27 -0
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/sdk/bridge.js +2 -2
- package/dist/sdk/index.js +3 -3
- package/dist/sdk/runner.js +3 -3
- package/dist/{setup-H3WCLOEH.js → setup-M6QZBZSE.js} +4 -4
- package/dist/{setup-H3WCLOEH.js.map → setup-M6QZBZSE.js.map} +1 -1
- package/dist/tui/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-YNEJXDCZ.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { WorkspacePlugin } from './chunk-2ZP6KIIQ.js';
|
|
2
2
|
import { WebSocketServerTransport } from './chunk-WQ7DE5UC.js';
|
|
3
3
|
import { assembleSystemPrompt, buildCapabilitiesPromptSection } from './chunk-W3UDISS2.js';
|
|
4
|
-
import { EventNormalizer } from './chunk-
|
|
4
|
+
import { EventNormalizer } from './chunk-T5XXWWHT.js';
|
|
5
5
|
import { SUPPORTED_CLOUDS, CLOUD_SECRET_ENV_KEYS } from './chunk-ISQWMBKD.js';
|
|
6
6
|
import { classifyClaudeSdkError } from './chunk-GAH4YRCI.js';
|
|
7
|
-
import { createDriver } from './chunk-
|
|
7
|
+
import { createDriver } from './chunk-KF3KDVKT.js';
|
|
8
8
|
import { deployCatalogEntry, undeployCatalogEntry } from './chunk-LV2HPH3C.js';
|
|
9
9
|
import { registerBuiltinConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, ConnectorStartupError, buildSdkConnectorTools, buildSdkFlowTools } from './chunk-2257NSNY.js';
|
|
10
10
|
import { loadConnectorDeclarations, SecretProviderChain, PreMintedSecretProvider, InMemorySecretProvider, resolvedConfigToDeclarations, deriveSingleMaterializedConnectorDeclaration } from './chunk-Y6FV73IH.js';
|
|
@@ -4264,6 +4264,75 @@ function planFlowMutate(cmd, ctx) {
|
|
|
4264
4264
|
}
|
|
4265
4265
|
return { kind: "dispatch", dispatchId };
|
|
4266
4266
|
}
|
|
4267
|
+
function hostOpResumeStimulus(op, payload) {
|
|
4268
|
+
switch (op) {
|
|
4269
|
+
case "applyApproval":
|
|
4270
|
+
return {
|
|
4271
|
+
kind: "approval_received",
|
|
4272
|
+
nodeId: String(payload.nodeId ?? ""),
|
|
4273
|
+
decision: payload.decision === "rejected" ? "rejected" : "approved",
|
|
4274
|
+
feedback: typeof payload.feedback === "string" ? payload.feedback : void 0,
|
|
4275
|
+
decidedBy: String(payload.decidedBy ?? "user")
|
|
4276
|
+
};
|
|
4277
|
+
case "applyInput":
|
|
4278
|
+
return {
|
|
4279
|
+
kind: "input_received",
|
|
4280
|
+
nodeId: String(payload.nodeId ?? ""),
|
|
4281
|
+
response: payload.response,
|
|
4282
|
+
providedBy: String(payload.providedBy ?? "user")
|
|
4283
|
+
};
|
|
4284
|
+
case "retryNode":
|
|
4285
|
+
return {
|
|
4286
|
+
kind: "retry_requested",
|
|
4287
|
+
nodeId: String(payload.nodeId ?? ""),
|
|
4288
|
+
requestedBy: String(payload.requestedBy ?? "user")
|
|
4289
|
+
};
|
|
4290
|
+
default:
|
|
4291
|
+
return null;
|
|
4292
|
+
}
|
|
4293
|
+
}
|
|
4294
|
+
function reconstructTypedStimulus(meta) {
|
|
4295
|
+
switch (meta.kind) {
|
|
4296
|
+
case "flow_started":
|
|
4297
|
+
return { kind: "flow_started" };
|
|
4298
|
+
case "user_message":
|
|
4299
|
+
return typeof meta.text === "string" ? {
|
|
4300
|
+
kind: "user_message",
|
|
4301
|
+
text: String(meta.text),
|
|
4302
|
+
senderId: String(meta.senderId ?? "user")
|
|
4303
|
+
} : null;
|
|
4304
|
+
case "approval_received":
|
|
4305
|
+
return {
|
|
4306
|
+
kind: "approval_received",
|
|
4307
|
+
nodeId: String(meta.nodeId),
|
|
4308
|
+
decision: meta.decision === "rejected" ? "rejected" : "approved",
|
|
4309
|
+
feedback: typeof meta.feedback === "string" ? meta.feedback : void 0,
|
|
4310
|
+
decidedBy: String(meta.decidedBy ?? "user")
|
|
4311
|
+
};
|
|
4312
|
+
case "input_received":
|
|
4313
|
+
return {
|
|
4314
|
+
kind: "input_received",
|
|
4315
|
+
nodeId: String(meta.nodeId),
|
|
4316
|
+
response: meta.response,
|
|
4317
|
+
providedBy: String(meta.providedBy ?? "user")
|
|
4318
|
+
};
|
|
4319
|
+
case "retry_requested":
|
|
4320
|
+
return {
|
|
4321
|
+
kind: "retry_requested",
|
|
4322
|
+
nodeId: String(meta.nodeId),
|
|
4323
|
+
requestedBy: String(meta.requestedBy ?? "user")
|
|
4324
|
+
};
|
|
4325
|
+
default:
|
|
4326
|
+
return null;
|
|
4327
|
+
}
|
|
4328
|
+
}
|
|
4329
|
+
function stimulusFromMetas(metas) {
|
|
4330
|
+
for (let i = metas.length - 1; i >= 0; i--) {
|
|
4331
|
+
const typed = reconstructTypedStimulus(metas[i] ?? {});
|
|
4332
|
+
if (typed) return typed;
|
|
4333
|
+
}
|
|
4334
|
+
return { kind: "state_changed" };
|
|
4335
|
+
}
|
|
4267
4336
|
async function startAgentServer(opts) {
|
|
4268
4337
|
const port = opts.port ?? 8080;
|
|
4269
4338
|
const sessionId = opts.sessionId ?? process.env.SKAILE_SESSION_ID ?? "session-unknown";
|
|
@@ -4782,19 +4851,7 @@ async function startAgentServer(opts) {
|
|
|
4782
4851
|
serverLog.warn("driveTurn fired with no active flow", { runId });
|
|
4783
4852
|
return;
|
|
4784
4853
|
}
|
|
4785
|
-
const
|
|
4786
|
-
let stimulus;
|
|
4787
|
-
if (lastKind === "flow_started") {
|
|
4788
|
-
stimulus = { kind: "flow_started" };
|
|
4789
|
-
} else if (lastKind === "user_message" && typeof lastMeta.text === "string") {
|
|
4790
|
-
stimulus = {
|
|
4791
|
-
kind: "user_message",
|
|
4792
|
-
text: String(lastMeta.text),
|
|
4793
|
-
senderId: String(lastMeta.senderId ?? "user")
|
|
4794
|
-
};
|
|
4795
|
-
} else {
|
|
4796
|
-
stimulus = { kind: "state_changed" };
|
|
4797
|
-
}
|
|
4854
|
+
const stimulus = stimulusFromMetas(metas);
|
|
4798
4855
|
const fullPrompt = buildOrchestratorPrompt(
|
|
4799
4856
|
entry.flowDef,
|
|
4800
4857
|
entry.adapter.getExecution(entry.handle),
|
|
@@ -5615,6 +5672,24 @@ async function startAgentServer(opts) {
|
|
|
5615
5672
|
}
|
|
5616
5673
|
case "dispatch": {
|
|
5617
5674
|
await resourceManager.executeOp(plan.dispatchId, cmd.op, cmd.payload ?? {});
|
|
5675
|
+
const resumeStimulus = hostOpResumeStimulus(cmd.op, cmd.payload ?? {});
|
|
5676
|
+
if (resumeStimulus) {
|
|
5677
|
+
const entry = getOnlyActiveFlow();
|
|
5678
|
+
if (entry) {
|
|
5679
|
+
void getOrCreateStimulusBus().signal(entry.connectorId, {
|
|
5680
|
+
promptFragment: renderStimulusPrompt(resumeStimulus),
|
|
5681
|
+
meta: {
|
|
5682
|
+
...resumeStimulus,
|
|
5683
|
+
runId: entry.runId
|
|
5684
|
+
}
|
|
5685
|
+
}).catch((err) => {
|
|
5686
|
+
serverLog.warn("host-op resume turn failed", {
|
|
5687
|
+
op: cmd.op,
|
|
5688
|
+
error: err instanceof Error ? err.message : String(err)
|
|
5689
|
+
});
|
|
5690
|
+
});
|
|
5691
|
+
}
|
|
5692
|
+
}
|
|
5618
5693
|
return;
|
|
5619
5694
|
}
|
|
5620
5695
|
}
|
|
@@ -6063,6 +6138,6 @@ function touchSession(state) {
|
|
|
6063
6138
|
return { ...state, updatedAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
6064
6139
|
}
|
|
6065
6140
|
|
|
6066
|
-
export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, MarkdownStreamer, PreInitRingSink, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildConnectorTokenMediator, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, builtinCapabilities, capabilityLogInstance, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, connectorRefreshKind, createAgentSession, createSessionStimulusBus, defineCapability, deleteSession, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureGitConfigInclude, extractClaudeAiOauthExpiresAt, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, installPreInitRingSink, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadSession, loadSessionById, mcpAuthSecretKey, newSession, pickRepointedManager, planFlowMutate, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveMixin, runAgentChat, saveSession, setCurrentSession, startAgentServer, touchSession, writeClaudeCodeCredentialsFile };
|
|
6067
|
-
//# sourceMappingURL=chunk-
|
|
6068
|
-
//# sourceMappingURL=chunk-
|
|
6141
|
+
export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, MarkdownStreamer, PreInitRingSink, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildConnectorTokenMediator, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, builtinCapabilities, capabilityLogInstance, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, connectorRefreshKind, createAgentSession, createSessionStimulusBus, defineCapability, deleteSession, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureGitConfigInclude, extractClaudeAiOauthExpiresAt, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, hostOpResumeStimulus, installPreInitRingSink, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadSession, loadSessionById, mcpAuthSecretKey, newSession, pickRepointedManager, planFlowMutate, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveMixin, runAgentChat, saveSession, setCurrentSession, startAgentServer, stimulusFromMetas, touchSession, writeClaudeCodeCredentialsFile };
|
|
6142
|
+
//# sourceMappingURL=chunk-JLJ3OMHR.js.map
|
|
6143
|
+
//# sourceMappingURL=chunk-JLJ3OMHR.js.map
|