MCPcopy Create free account
hub / github.com/pingdotgg/t3code / appendSetupScriptActivity

Function appendSetupScriptActivity

apps/server/src/ws.ts:526–555  ·  view source on GitHub ↗
(input: {
        readonly threadId: ThreadId;
        readonly kind: "setup-script.requested" | "setup-script.started" | "setup-script.failed";
        readonly summary: string;
        readonly createdAt: string;
        readonly payload: Record<string, unknown>;
        readonly tone: "info" | "error";
      })

Source from the content-addressed store, hash-verified

524 );
525
526 const appendSetupScriptActivity = (input: {
527 readonly threadId: ThreadId;
528 readonly kind: "setup-script.requested" | "setup-script.started" | "setup-script.failed";
529 readonly summary: string;
530 readonly createdAt: string;
531 readonly payload: Record<string, unknown>;
532 readonly tone: "info" | "error";
533 }) =>
534 Effect.all({
535 commandId: serverCommandId("setup-script-activity"),
536 activityId: serverEventId,
537 }).pipe(
538 Effect.flatMap(({ commandId, activityId }) =>
539 orchestrationEngine.dispatch({
540 type: "thread.activity.append",
541 commandId,
542 threadId: input.threadId,
543 activity: {
544 id: activityId,
545 tone: input.tone,
546 kind: input.kind,
547 summary: input.summary,
548 payload: input.payload,
549 turnId: null,
550 createdAt: input.createdAt,
551 },
552 createdAt: input.createdAt,
553 }),
554 ),
555 );
556
557 const toBootstrapDispatchCommandCauseError = (cause: Cause.Cause<unknown>) => {
558 const error = Cause.squash(cause);

Callers 2

recordSetupScriptStartedFunction · 0.85

Calls 1

serverCommandIdFunction · 0.70

Tested by

no test coverage detected