anymorph 0.15.0 → 0.16.0

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.
Files changed (2) hide show
  1. package/dist/index.js +122 -22
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -12211,22 +12211,120 @@ var require_cms_theme_tokens = __commonJS({
12211
12211
  }
12212
12212
  });
12213
12213
 
12214
+ // node_modules/.pnpm/@anymorph+shared-contracts@file+..+shared-contracts/node_modules/@anymorph/shared-contracts/src/geo-agent-runner.cjs
12215
+ var require_geo_agent_runner = __commonJS({
12216
+ "node_modules/.pnpm/@anymorph+shared-contracts@file+..+shared-contracts/node_modules/@anymorph/shared-contracts/src/geo-agent-runner.cjs"(exports, module) {
12217
+ var yaml = require_js_yaml();
12218
+ var { z } = require_zod();
12219
+ var GeoAgentExecutorRuntimeSchema2 = z.enum(["fake", "claude", "codex", "cline"]);
12220
+ var GeoAgentExecutorProviderSchema2 = z.enum(["anthropic", "openai", "openrouter", "custom"]);
12221
+ var GeoAgentSubmitModeSchema2 = z.enum(["dry_run", "commit_only", "pull_request"]);
12222
+ var GeoAgentJobStatusSchema2 = z.enum([
12223
+ "queued",
12224
+ "claimed",
12225
+ "preparing",
12226
+ "running",
12227
+ "validating",
12228
+ "pr_opened",
12229
+ "commit_pushed",
12230
+ "dry_run_succeeded",
12231
+ "failed",
12232
+ "cancelled",
12233
+ "stale"
12234
+ ]);
12235
+ var GeoAgentMinMaxSchema2 = z.object({
12236
+ min: z.number().int().nonnegative(),
12237
+ max: z.number().int().nonnegative()
12238
+ }).strict().refine((value) => value.min <= value.max, {
12239
+ message: "min must be less than or equal to max"
12240
+ });
12241
+ var GeoAgentExecutorSchema2 = z.object({
12242
+ runtime: GeoAgentExecutorRuntimeSchema2,
12243
+ provider: GeoAgentExecutorProviderSchema2,
12244
+ model: z.string().trim().min(1).optional(),
12245
+ timeoutMinutes: GeoAgentMinMaxSchema2
12246
+ }).strict();
12247
+ var GeoAgentLimitsSchema2 = z.object({
12248
+ brandOwned: GeoAgentMinMaxSchema2,
12249
+ geoPages: GeoAgentMinMaxSchema2,
12250
+ thirdParty: GeoAgentMinMaxSchema2
12251
+ }).strict();
12252
+ var GeoAgentGitSchema2 = z.object({
12253
+ baseBranch: z.string().trim().min(1).default("main"),
12254
+ branchPrefix: z.string().trim().min(1).default("geo-agent"),
12255
+ submit: z.object({
12256
+ mode: GeoAgentSubmitModeSchema2.default("dry_run")
12257
+ }).strict()
12258
+ }).strict();
12259
+ var GeoAgentArtifactsSchema2 = z.object({
12260
+ requireMdx: z.boolean().default(true),
12261
+ requireActionsJson: z.boolean().default(true),
12262
+ runRoot: z.string().trim().min(1).default("agent/runs")
12263
+ }).strict();
12264
+ var GeoAgentJobSpecSchema2 = z.object({
12265
+ version: z.literal(1),
12266
+ tenant: z.string().trim().min(1),
12267
+ runName: z.string().trim().min(1).optional(),
12268
+ executor: GeoAgentExecutorSchema2,
12269
+ limits: GeoAgentLimitsSchema2,
12270
+ git: GeoAgentGitSchema2,
12271
+ artifacts: GeoAgentArtifactsSchema2
12272
+ }).strict().superRefine((spec, ctx) => {
12273
+ if (spec.limits.geoPages.min > 0 && !spec.artifacts.requireMdx) {
12274
+ ctx.addIssue({
12275
+ code: z.ZodIssueCode.custom,
12276
+ path: ["artifacts", "requireMdx"],
12277
+ message: "geoPages.min > 0 requires artifacts.requireMdx=true"
12278
+ });
12279
+ }
12280
+ });
12281
+ var GeoAgentJobEventSchema2 = z.object({
12282
+ level: z.enum(["debug", "info", "warn", "error"]),
12283
+ source: z.string().trim().min(1),
12284
+ stepId: z.string().trim().min(1).optional(),
12285
+ eventType: z.string().trim().min(1),
12286
+ message: z.string().optional(),
12287
+ data: z.record(z.string(), z.unknown()).optional(),
12288
+ ts: z.string().datetime().optional()
12289
+ }).strict();
12290
+ var GeoAgentJobArtifactSchema2 = z.object({
12291
+ kind: z.string().trim().min(1),
12292
+ path: z.string().trim().min(1),
12293
+ sha256: z.string().trim().min(1).optional(),
12294
+ sizeBytes: z.number().int().nonnegative().optional(),
12295
+ data: z.record(z.string(), z.unknown()).optional()
12296
+ }).strict();
12297
+ function parseGeoAgentJobSpecYaml2(yamlText) {
12298
+ const parsed = yaml.load(yamlText);
12299
+ return GeoAgentJobSpecSchema2.parse(parsed);
12300
+ }
12301
+ module.exports = {
12302
+ GeoAgentExecutorRuntimeSchema: GeoAgentExecutorRuntimeSchema2,
12303
+ GeoAgentExecutorProviderSchema: GeoAgentExecutorProviderSchema2,
12304
+ GeoAgentSubmitModeSchema: GeoAgentSubmitModeSchema2,
12305
+ GeoAgentJobStatusSchema: GeoAgentJobStatusSchema2,
12306
+ GeoAgentMinMaxSchema: GeoAgentMinMaxSchema2,
12307
+ GeoAgentExecutorSchema: GeoAgentExecutorSchema2,
12308
+ GeoAgentLimitsSchema: GeoAgentLimitsSchema2,
12309
+ GeoAgentGitSchema: GeoAgentGitSchema2,
12310
+ GeoAgentArtifactsSchema: GeoAgentArtifactsSchema2,
12311
+ GeoAgentJobSpecSchema: GeoAgentJobSpecSchema2,
12312
+ GeoAgentJobEventSchema: GeoAgentJobEventSchema2,
12313
+ GeoAgentJobArtifactSchema: GeoAgentJobArtifactSchema2,
12314
+ parseGeoAgentJobSpecYaml: parseGeoAgentJobSpecYaml2
12315
+ };
12316
+ }
12317
+ });
12318
+
12214
12319
  // node_modules/.pnpm/@anymorph+shared-contracts@file+..+shared-contracts/node_modules/@anymorph/shared-contracts/src/index.cjs
12215
12320
  var require_src = __commonJS({
12216
12321
  "node_modules/.pnpm/@anymorph+shared-contracts@file+..+shared-contracts/node_modules/@anymorph/shared-contracts/src/index.cjs"(exports, module) {
12217
12322
  var { z } = require_zod();
12218
12323
  var cmsFrontmatter = require_cms_frontmatter();
12219
12324
  var cmsThemeTokens = require_cms_theme_tokens();
12325
+ var geoAgentRunner = require_geo_agent_runner();
12220
12326
  var HOSTNAME_LABEL_RE = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;
12221
12327
  var CMS_MDX_COMPONENT_CONTRACTS2 = Object.freeze({
12222
- ArticleHeader: Object.freeze({
12223
- reserved: true,
12224
- reason: "ArticleHeader is renderer-owned and must be derived from frontmatter/meta, not authored in MDX."
12225
- }),
12226
- RelatedContent: Object.freeze({
12227
- reserved: true,
12228
- reason: "RelatedContent is backend-owned and must be derived from related page data, not authored in MDX."
12229
- }),
12230
12328
  Callout: Object.freeze({
12231
12329
  props: Object.freeze({
12232
12330
  tone: Object.freeze({
@@ -12253,22 +12351,10 @@ var require_src = __commonJS({
12253
12351
  }
12254
12352
  function validateCmsMdxComponentContracts2(mdx) {
12255
12353
  const issues = [];
12256
- checkReservedComponents(mdx, issues);
12257
12354
  checkRequiredComponentProps(mdx, issues);
12258
12355
  checkEnumComponentProps(mdx, issues);
12259
12356
  return issues;
12260
12357
  }
12261
- function checkReservedComponents(mdx, issues) {
12262
- for (const [component, contract] of Object.entries(CMS_MDX_COMPONENT_CONTRACTS2)) {
12263
- if (!contract.reserved) continue;
12264
- if (!findComponentAttrs(mdx, component).length) continue;
12265
- issues.push({
12266
- code: "reserved_component",
12267
- component,
12268
- message: `<${component}> is renderer/backend-owned and must not be authored in MDX. ${contract.reason ?? ""}`.trim()
12269
- });
12270
- }
12271
- }
12272
12358
  function checkRequiredComponentProps(mdx, issues) {
12273
12359
  for (const [component, contract] of Object.entries(CMS_MDX_COMPONENT_CONTRACTS2)) {
12274
12360
  if (!Array.isArray(contract.requiredProps) || contract.requiredProps.length === 0) continue;
@@ -13605,7 +13691,8 @@ var require_src = __commonJS({
13605
13691
  validateCmsMdxComponentContracts: validateCmsMdxComponentContracts2,
13606
13692
  repairCmsMdxComponentContracts: repairCmsMdxComponentContracts2,
13607
13693
  CMS_RELATED_CONTENT_TITLE_BY_LANG: CMS_RELATED_CONTENT_TITLE_BY_LANG2,
13608
- getCmsRelatedContentTitle: getCmsRelatedContentTitle2
13694
+ getCmsRelatedContentTitle: getCmsRelatedContentTitle2,
13695
+ ...geoAgentRunner
13609
13696
  };
13610
13697
  }
13611
13698
  });
@@ -22627,6 +22714,19 @@ var validateCmsMdxComponentContracts = import_index2.default.validateCmsMdxCompo
22627
22714
  var repairCmsMdxComponentContracts = import_index2.default.repairCmsMdxComponentContracts;
22628
22715
  var CMS_RELATED_CONTENT_TITLE_BY_LANG = import_index2.default.CMS_RELATED_CONTENT_TITLE_BY_LANG;
22629
22716
  var getCmsRelatedContentTitle = import_index2.default.getCmsRelatedContentTitle;
22717
+ var GeoAgentExecutorRuntimeSchema = import_index2.default.GeoAgentExecutorRuntimeSchema;
22718
+ var GeoAgentExecutorProviderSchema = import_index2.default.GeoAgentExecutorProviderSchema;
22719
+ var GeoAgentSubmitModeSchema = import_index2.default.GeoAgentSubmitModeSchema;
22720
+ var GeoAgentJobStatusSchema = import_index2.default.GeoAgentJobStatusSchema;
22721
+ var GeoAgentMinMaxSchema = import_index2.default.GeoAgentMinMaxSchema;
22722
+ var GeoAgentExecutorSchema = import_index2.default.GeoAgentExecutorSchema;
22723
+ var GeoAgentLimitsSchema = import_index2.default.GeoAgentLimitsSchema;
22724
+ var GeoAgentGitSchema = import_index2.default.GeoAgentGitSchema;
22725
+ var GeoAgentArtifactsSchema = import_index2.default.GeoAgentArtifactsSchema;
22726
+ var GeoAgentJobSpecSchema = import_index2.default.GeoAgentJobSpecSchema;
22727
+ var GeoAgentJobEventSchema = import_index2.default.GeoAgentJobEventSchema;
22728
+ var GeoAgentJobArtifactSchema = import_index2.default.GeoAgentJobArtifactSchema;
22729
+ var parseGeoAgentJobSpecYaml = import_index2.default.parseGeoAgentJobSpecYaml;
22630
22730
  var reasonTagSchema = import_index2.default.reasonTagSchema;
22631
22731
  var reasonClassSchema = import_index2.default.reasonClassSchema;
22632
22732
  var REASON_TAG_CLASS = import_index2.default.REASON_TAG_CLASS;
@@ -46957,7 +47057,7 @@ function printScaffoldError(prefix, err) {
46957
47057
 
46958
47058
  // src/index.ts
46959
47059
  var program2 = new Command();
46960
- program2.name("anymorph").description("Check AI visibility and run local GEO strategy workflows").version("0.15.0");
47060
+ program2.name("anymorph").description("Check AI visibility and run local GEO strategy workflows").version("0.16.0");
46961
47061
  program2.command("login").description("Sign in to your Anymorph account").addHelpText(
46962
47062
  "after",
46963
47063
  `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anymorph",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "Check your brand's AI visibility across ChatGPT, Perplexity, Gemini, and more",
5
5
  "type": "module",
6
6
  "private": false,