Agent Maturity Compass API - v1.2.0
    Preparing search index...

    Function preparePromptForBridgeRequest

    • Parameters

      • params: {
            agentId: string;
            body: unknown;
            provider:
                | "gemini"
                | "openai"
                | "anthropic"
                | "openrouter"
                | "xai"
                | "generic";
            requestKind: string;
            workspace: string;
        }

      Returns Promise<
          | {
              binding?: undefined;
              body?: undefined;
              code: string;
              ok: false;
              overrideMatches?: undefined;
              policy?: undefined;
              reasons: string[];
              status: number;
          }
          | {
              binding?: undefined;
              body?: undefined;
              code: string;
              ok: false;
              overrideMatches: string[];
              policy?: undefined;
              reasons: string[];
              status: number;
          }
          | {
              binding: {
                  cgxPackSha256: string;
                  packId: string;
                  packSha256: string;
                  templateId: string;
              };
              body: unknown;
              code?: undefined;
              ok: true;
              overrideMatches: string[];
              policy: {
                  promptPolicy: {
                      enforcement: {
                          failClosedOnLintFail: boolean;
                          maxClockSkewSeconds: number;
                          mode: "OFF"
                          | "ENFORCE";
                          overridePatterns: string[];
                          rejectIfUserTriesToOverride: boolean;
                          requireNotarySigner: boolean;
                          requirePackSignatureValid: boolean;
                          stripUserSystemMessages: boolean;
                      };
                      privacy: {
                          allowIncludeModelNames: boolean;
                          allowIncludeToolNames: boolean;
                          includeMaturityScoreInPrompt: boolean;
                          includeNumericTargetsInPrompt: boolean;
                          includeOnlyTopTasksCount: number;
                          redactAllEmails: boolean;
                          redactAllFilePaths: boolean;
                      };
                      recurrence: {
                          refreshCadenceHours: number;
                          refreshOnEvents: (
                              | "POLICY_APPLIED"
                              | "PLUGIN_INSTALLED"
                              | "TRANSFORM_PLAN_CREATED"
                              | "ADVISORY_CREATED"
                              | "CGX_PACK_UPDATED"
                              | "MECHANIC_TARGETS_UPDATED"
                          )[];
                      };
                      templates: {
                          byAgentType: {
                              "code-agent": string;
                              "ops-agent": string;
                              other: string;
                              "research-agent": string;
                              "sales-agent": string;
                              "support-agent": string;
                          };
                          defaultTemplate: string;
                          providerOverrides: {
                              anthropic: string;
                              gemini: string;
                              openai: string;
                              openrouter: string;
                              xai: string;
                          };
                      };
                      truth: {
                          allowedOutputContractSchemaIds: string[];
                          enforcementMode: "WARN"
                          | "ENFORCE";
                          requireEvidenceRefsForStrongClaims: boolean;
                          requireTruthguardForBridgeResponses: boolean;
                          strongClaimRegexes: string[];
                          structuredOutput: {
                              openaiResponseFormatJson: boolean;
                              prefer: boolean;
                          };
                      };
                      version: 1;
                  };
              };
              reasons?: undefined;
              status?: undefined;
          },
      >