@fjall/ai-tools 2.34.0 → 3.0.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.
package/dist/registry.js CHANGED
@@ -38,7 +38,7 @@ export const AI_TOOL_REGISTRY = [
38
38
  spec("trigger_deployment", "Trigger a new deployment for an application. Verifies the application exists, has a connected AWS account and repository, and no active deployment is running. Creates a deployment record and enqueues it for processing.", triggerDeploymentSchema, "write", "admin"),
39
39
  spec("manage_secret", "Manage application secrets stored in AWS SSM Parameter Store. Supports: list (show secret names without values), set (create or update), and delete. Never exposes secret values — the get operation is intentionally excluded.", manageSecretSchema, "write", "admin"),
40
40
  spec("update_configuration", "Update an application's configuration — name, description, or config path. Only safe, non-security-sensitive fields can be changed. At least one field must be provided.", updateConfigurationSchema, "write", "admin"),
41
- spec("manage_domain", "Manage custom domains for your applications. Currently supports listing connected environments/accounts. Add and remove operations direct users to the settings page for manual configuration.", manageDomainSchema, "read"),
41
+ spec("manage_domain", "Read-only domain management mirroring the CLI domain surface. Operations: list (declared domains with live zone and stack status), records_list (every live record with its ownership classification — declared/satellite/residue/unknown; unknown is never remediable, classification fails closed), sync_report (the same classification as a read-only report — this tool never deletes records), verify (DNS nameserver delegation check), and mutation_commands (the exact ceremony-gated CLI commands for deploy/sync --fix/destroy/delegate, which this tool never executes — destructive consent stays with the user).", manageDomainSchema, "read"),
42
42
  spec("provision_region", "Add an AWS region to the organisation and deploy infrastructure to it. Shows a consequence preview (affected accounts, deployment shape) before asking the user to confirm. Requires admin role.", provisionRegionSchema, "write", "admin"),
43
43
  ];
44
44
  /** Look up a tool spec by name. */
@@ -1,9 +1,25 @@
1
1
  import { z } from "zod";
2
+ /**
3
+ * READ + SAFE surface only — mirrors the CLI agent surface's domain read
4
+ * verbs (`fjall domain list`, `fjall domain records list <zone>`,
5
+ * `fjall domain sync <zone>` report mode, `fjall domain verify <domain>`).
6
+ *
7
+ * Mutations are deliberately absent from the operation vocabulary: the
8
+ * destruction ceremony (named per-row consent, exit 4 = DESTRUCTION_WITHHELD)
9
+ * lives on the CLI surface, and an AI tool must never hold that consent
10
+ * power. `mutation_commands` returns the exact ceremony-gated CLI commands
11
+ * instead — the executor's counterpart of the CLI's exit-4 help text.
12
+ */
2
13
  export declare const manageDomainSchema: z.ZodObject<{
3
14
  operation: z.ZodEnum<{
4
15
  list: "list";
16
+ records_list: "records_list";
17
+ sync_report: "sync_report";
18
+ verify: "verify";
19
+ mutation_commands: "mutation_commands";
5
20
  add: "add";
6
21
  remove: "remove";
7
22
  }>;
23
+ domain: z.ZodOptional<z.ZodString>;
8
24
  }, z.core.$strict>;
9
25
  export type ManageDomainInput = z.infer<typeof manageDomainSchema>;
@@ -1,8 +1,48 @@
1
1
  import { z } from "zod";
2
+ /**
3
+ * READ + SAFE surface only — mirrors the CLI agent surface's domain read
4
+ * verbs (`fjall domain list`, `fjall domain records list <zone>`,
5
+ * `fjall domain sync <zone>` report mode, `fjall domain verify <domain>`).
6
+ *
7
+ * Mutations are deliberately absent from the operation vocabulary: the
8
+ * destruction ceremony (named per-row consent, exit 4 = DESTRUCTION_WITHHELD)
9
+ * lives on the CLI surface, and an AI tool must never hold that consent
10
+ * power. `mutation_commands` returns the exact ceremony-gated CLI commands
11
+ * instead — the executor's counterpart of the CLI's exit-4 help text.
12
+ */
2
13
  export const manageDomainSchema = z
3
14
  .object({
4
15
  operation: z
5
- .enum(["list", "add", "remove"])
6
- .describe("list: show configured environments/accounts; add/remove: redirects to settings page"),
16
+ .enum([
17
+ "list",
18
+ "records_list",
19
+ "sync_report",
20
+ "verify",
21
+ "mutation_commands",
22
+ "add",
23
+ "remove",
24
+ ])
25
+ .describe("list: declared domains with live zone/stack status; " +
26
+ "records_list: every live record with its ownership classification " +
27
+ "(declared/satellite/residue/unknown — unknown is NEVER remediable; " +
28
+ "classification fails closed); sync_report: the same classification " +
29
+ "grouped per class as a read-only report (never deletes anything); " +
30
+ "verify: DNS nameserver delegation check; mutation_commands: the " +
31
+ "exact ceremony-gated CLI commands for the mutations this tool " +
32
+ "never performs. add/remove are deprecated aliases of " +
33
+ "mutation_commands."),
34
+ domain: z
35
+ .string()
36
+ .min(1)
37
+ .max(253)
38
+ .optional()
39
+ .describe("Domain (hosted zone) name — required for records_list, sync_report, " +
40
+ "and verify; optional context for mutation_commands"),
7
41
  })
8
- .strict();
42
+ .strict()
43
+ .refine((data) => !((data.operation === "records_list" ||
44
+ data.operation === "sync_report" ||
45
+ data.operation === "verify") &&
46
+ data.domain === undefined), {
47
+ message: "domain is required for records_list, sync_report, and verify operations",
48
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fjall/ai-tools",
3
- "version": "2.34.0",
3
+ "version": "3.0.0",
4
4
  "description": "Shared AI tool schemas and registry for Fjall webapp and CLI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -51,5 +51,5 @@
51
51
  "engines": {
52
52
  "node": ">=22.0.0"
53
53
  },
54
- "gitHead": "8c553fca8f9737d445061ea75cf6c6c7db0d24c9"
54
+ "gitHead": "848a386e3e2244401b76faabd02818c682d231e8"
55
55
  }