@codeam/shared 2.76.16 → 2.76.17

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.mjs CHANGED
@@ -3101,6 +3101,34 @@ var SCRATCH_STARTER_PROMPTS = [
3101
3101
  var SCRATCH_ZIP_FREE_LIMIT_BYTES = 104857600;
3102
3102
  var SCRATCH_ZIP_WIFI_HINT_BYTES = 209715200;
3103
3103
 
3104
+ // src/types/session-blocker.ts
3105
+ import { z as z2 } from "zod";
3106
+ var SESSION_BLOCKER_KINDS = [
3107
+ /** CodeAgent Cloud usage ceiling — PRO lifts it. */
3108
+ "house_agent_limit",
3109
+ /** CodeAgent Cloud down on OUR side — nothing to buy. */
3110
+ "house_agent_unavailable",
3111
+ /** The vendor (e.g. Cursor) needs a paid plan to run its agent. */
3112
+ "agent_plan_required",
3113
+ /** The user's own agent credentials are invalid/expired. */
3114
+ "agent_auth_failed",
3115
+ /** The prepaid CodeAgent wallet is empty. */
3116
+ "credits_exhausted",
3117
+ /** The user's OWN provider key (OpenRouter, …) has no balance. */
3118
+ "provider_credits_exhausted",
3119
+ /** The agent process died before it could open a session. */
3120
+ "agent_startup_failed"
3121
+ ];
3122
+ var SessionBlockerSchema = z2.object({
3123
+ kind: z2.enum(SESSION_BLOCKER_KINDS),
3124
+ agentId: z2.string().min(1).max(64).optional(),
3125
+ provider: z2.string().min(1).max(120).optional()
3126
+ });
3127
+ function toSessionBlocker(raw) {
3128
+ const parsed = SessionBlockerSchema.safeParse(raw);
3129
+ return parsed.success ? parsed.data : null;
3130
+ }
3131
+
3104
3132
  // src/preview-prompts.ts
3105
3133
  var PREVIEW_DETECT_PROMPT = `
3106
3134
  Analyze the project in the current working directory and return how to start
@@ -3147,6 +3175,12 @@ CRITICAL \u2014 setup_commands:
3147
3175
 
3148
3176
  OUTPUT JSON ONLY. NO MARKDOWN. NO COMMENTARY.
3149
3177
  `.trim();
3178
+
3179
+ // src/types/plugin-agents.ts
3180
+ var PLUGIN_AGENT_STATUSES = ["ready", "not_installed", "not_signed_in", "failed"];
3181
+ function isPluginAgentStatus(x) {
3182
+ return typeof x === "string" && PLUGIN_AGENT_STATUSES.includes(x);
3183
+ }
3150
3184
  export {
3151
3185
  AGENT_REGISTRY,
3152
3186
  AGENT_STANDARD_BLOCK,
@@ -3189,6 +3223,7 @@ export {
3189
3223
  PACK_START_COMMAND,
3190
3224
  PACK_STATUS_COMMAND,
3191
3225
  PACK_WORKFLOW_ARTICLE,
3226
+ PLUGIN_AGENT_STATUSES,
3192
3227
  PREVIEW_DETECT_PROMPT,
3193
3228
  PROTOCOL_VERSION,
3194
3229
  PUBLIC_TO_INTERNAL,
@@ -3197,6 +3232,7 @@ export {
3197
3232
  SCRATCH_STARTER_PROMPTS,
3198
3233
  SCRATCH_ZIP_FREE_LIMIT_BYTES,
3199
3234
  SCRATCH_ZIP_WIFI_HINT_BYTES,
3235
+ SESSION_BLOCKER_KINDS,
3200
3236
  SKILL_REGISTRY,
3201
3237
  SPECIFIER_PROMPT,
3202
3238
  SQUAD_CONFIGURE_COMMAND,
@@ -3208,6 +3244,7 @@ export {
3208
3244
  SSE_SOCKET_TIMEOUT_MS,
3209
3245
  STACK_TO_RECOMMENDED,
3210
3246
  SWITCH_AGENT_COMMAND,
3247
+ SessionBlockerSchema,
3211
3248
  TERMINAL_AGENT_PREFIX,
3212
3249
  UNKNOWN_MODEL_PRICING,
3213
3250
  UPCOMING_INTEGRATION_IDS,
@@ -3236,6 +3273,7 @@ export {
3236
3273
  isManagedProviderId,
3237
3274
  isNoopInstallSnippet,
3238
3275
  isPackId,
3276
+ isPluginAgentStatus,
3239
3277
  isSkillId,
3240
3278
  normalizeAgentId,
3241
3279
  normalizeGuardrailPolicy,
@@ -3247,6 +3285,7 @@ export {
3247
3285
  resolveApiBaseUrl,
3248
3286
  skillHasRail,
3249
3287
  toRemoteCommand,
3288
+ toSessionBlocker,
3250
3289
  tryGetContextWindow
3251
3290
  };
3252
3291
  //# sourceMappingURL=index.mjs.map