@asterism-app/builtin-api 0.28.0 → 0.29.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asterism-app/builtin-api",
3
- "version": "0.28.0",
3
+ "version": "0.29.0",
4
4
  "description": "Public domain contracts and extensions for Asterism built-in features",
5
5
  "license": "MIT",
6
6
  "author": "Chien Zhang",
package/src/agent.ts CHANGED
@@ -7,8 +7,8 @@ import { agentMessageSenderSchema } from "./messaging.ts";
7
7
 
8
8
  /** Agents are ordinary resources: creation events record only identity; mutable data such as model selection belongs to private resource state. */
9
9
  export const Agent = builtin.resource("agent", z.object({}));
10
- /** Factory default and baseline for custom Agent configurations; the user-selected default is exposed by AgentServices.defaultAgentId. */
11
- export const defaultAgentPreset = "worker";
10
+ /** Factory default Agent configuration; the user-selected default is exposed by AgentServices.defaultAgentId. */
11
+ export const defaultAgentPreset = "general";
12
12
  /** Pending input is delivered at request or turn boundaries; execution starts immediately when idle. */
13
13
  export const agentInputModeSchema = z.enum(["steer", "follow"]);
14
14
  /** Submissions and drafts share a 16-character Nano ID identity. */
@@ -3,7 +3,7 @@ import { modelExpressionSchema, thinkingSchema } from "@asterism-app/sdk/contrac
3
3
  /** Configurations use readable slugs for identification by both users and models. */
4
4
  export const configurationIdSchema = z.string().trim().min(1).max(160).regex(/^[a-z0-9]+(?:[-_][a-z0-9]+)*$/u, "Use lowercase letters, digits, hyphens or underscores.");
5
5
  export const modelRoleInputSchema = z.strictObject({
6
- model: modelExpressionSchema.nullable(), thinking: thinkingSchema.nullable(), enabled: z.boolean(), description: z.string().max(20_000), hidden: z.boolean(),
6
+ model: modelExpressionSchema.nullable(), thinking: thinkingSchema.nullable(), enabled: z.boolean(), description: z.string().max(20_000),
7
7
  });
8
8
  export const modelRoleSchema = modelRoleInputSchema.extend({ id: configurationIdSchema, builtin: z.boolean() });
9
9
  export const modelRoleOverridesSchema = modelRoleInputSchema.partial();
@@ -21,7 +21,9 @@ const subagentConfigurationSchema = z.strictObject({
21
21
  });
22
22
  const resourceTypesSchema = z.array(z.string().trim().min(1).max(160)).max(200).nullable();
23
23
  const agentFieldsSchema = z.strictObject({
24
- enabled: z.boolean(), description: z.string().max(20_000), systemPrompt: z.string().max(100_000),
24
+ enabled: z.boolean(),
25
+ availableToAgents: z.boolean().describe("Whether models can discover or newly select this configuration for creation or delegation. Existing selections and user-selected conversations are unaffected."),
26
+ description: z.string().max(20_000), systemPrompt: z.string().max(100_000),
25
27
  modelRole: configurationIdSchema.nullable(), examples: z.array(z.string().max(4_000)).max(50),
26
28
  subagent: subagentConfigurationSchema,
27
29
  resources: resourceTypesSchema,