anbaric-state-machine 1.41.0 → 1.43.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.
@@ -0,0 +1,23 @@
1
+ import { Agent, AgentRequest } from "anbaric-tsapi";
2
+ type FetchFn = (url: string, init: RequestInit) => Promise<Response>;
3
+ type AnthropicConnection = {
4
+ apiKey: string;
5
+ model: string;
6
+ baseUrl?: string;
7
+ version?: string;
8
+ maxTokens?: number;
9
+ };
10
+ declare class AnthropicClient extends Agent.Client {
11
+ private connection;
12
+ private fetchFn;
13
+ private baseUrl;
14
+ constructor(connection: AnthropicConnection, fetchFn?: FetchFn);
15
+ generate(request: AgentRequest): Promise<Record<string, any>>;
16
+ private conversation;
17
+ }
18
+ declare class AnthropicAgent extends Agent {
19
+ constructor(id: string, role: string, connection: AnthropicConnection, fetchFn?: FetchFn);
20
+ }
21
+ export { AnthropicAgent, AnthropicClient };
22
+ export type { AnthropicConnection };
23
+ //# sourceMappingURL=AnthropicAgent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnthropicAgent.d.ts","sourceRoot":"","sources":["../../../src/actors/agents/AnthropicAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAgB,YAAY,EAAC,MAAM,eAAe,CAAC;AAEhE,KAAK,OAAO,GAAG,CAAC,GAAG,EAAG,MAAM,EAAE,IAAI,EAAG,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEvE,KAAK,mBAAmB,GAAG;IACvB,MAAM,EAAG,MAAM,CAAC;IAChB,KAAK,EAAG,MAAM,CAAC;IACf,OAAO,CAAC,EAAG,MAAM,CAAC;IAClB,OAAO,CAAC,EAAG,MAAM,CAAC;IAClB,SAAS,CAAC,EAAG,MAAM,CAAC;CACvB,CAAC;AAWF,cAAM,eAAgB,SAAQ,KAAK,CAAC,MAAM;IAI1B,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,OAAO;IAH3B,OAAO,CAAC,OAAO,CAAU;IAEzB,YAAoB,UAAU,EAAG,mBAAmB,EAChC,OAAO,GAAG,OAAyC,EAGtE;IAEK,QAAQ,CAAC,OAAO,EAAG,YAAY,GAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAoCpE;IAKD,OAAO,CAAC,YAAY;CAMvB;AAGD,cAAM,cAAe,SAAQ,KAAK;IAE9B,YAAY,EAAE,EAAG,MAAM,EAAE,IAAI,EAAG,MAAM,EAAE,UAAU,EAAG,mBAAmB,EAC5D,OAAO,GAAG,OAAyC,EAE9D;CAEJ;AAED,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA;AAC1C,YAAY,EAAE,mBAAmB,EAAE,CAAA"}
@@ -0,0 +1,70 @@
1
+ import { Agent } from "anbaric-tsapi";
2
+ const TOOL_NAME = "properties";
3
+ const DEFAULT_VERSION = "2023-06-01";
4
+ const DEFAULT_MAX_TOKENS = 4096;
5
+ /* The functional half of an Anthropic agent. Two things differ from the
6
+ OpenAI-compatible shape: the system prompt is its own field rather than a
7
+ message, and there is no JSON-schema response format - so the request's
8
+ schema is offered as a single tool the model is forced to call, and the
9
+ arguments it calls it with are the structured output. */
10
+ class AnthropicClient extends Agent.Client {
11
+ connection;
12
+ fetchFn;
13
+ baseUrl;
14
+ constructor(connection, fetchFn = (url, init) => fetch(url, init)) {
15
+ super();
16
+ this.connection = connection;
17
+ this.fetchFn = fetchFn;
18
+ this.baseUrl = connection.baseUrl ?? "https://api.anthropic.com/v1";
19
+ }
20
+ async generate(request) {
21
+ const system = request.messages.filter(message => message.role === "system")
22
+ .map(message => message.content).join("\n\n");
23
+ const response = await this.fetchFn(`${this.baseUrl}/messages`, {
24
+ method: "POST",
25
+ headers: {
26
+ "content-type": "application/json",
27
+ "x-api-key": this.connection.apiKey,
28
+ "anthropic-version": this.connection.version ?? DEFAULT_VERSION,
29
+ },
30
+ body: JSON.stringify({
31
+ model: this.connection.model,
32
+ max_tokens: this.connection.maxTokens ?? DEFAULT_MAX_TOKENS,
33
+ ...(system ? { system } : {}),
34
+ messages: this.conversation(request.messages),
35
+ tools: [{
36
+ name: TOOL_NAME,
37
+ description: "Return the properties to write to the job.",
38
+ input_schema: request.outputSchema,
39
+ }],
40
+ tool_choice: { type: "tool", name: TOOL_NAME },
41
+ }),
42
+ });
43
+ if (!response.ok) {
44
+ const problem = await response.json().catch(() => ({}));
45
+ throw new Error(`The Anthropic request failed with status ${response.status}${problem.error?.message ? `: ${problem.error.message}` : ""}`);
46
+ }
47
+ const body = await response.json();
48
+ const called = body.content?.find(block => block.type === "tool_use" && block.name === TOOL_NAME);
49
+ if (!called || typeof called.input !== "object" || called.input === null) {
50
+ throw new Error("The Anthropic response carried no structured content");
51
+ }
52
+ return called.input;
53
+ }
54
+ // The conversation Anthropic sees: system messages are lifted out, and the
55
+ // turns must start with the user, so a conversation opening on an assistant
56
+ // turn is left to the API to reject rather than silently reshaped.
57
+ conversation(messages) {
58
+ return messages
59
+ .filter(message => message.role !== "system")
60
+ .map(message => ({ role: message.role === "assistant" ? "assistant" : "user", content: message.content }));
61
+ }
62
+ }
63
+ /* A light agent backed by the Anthropic Messages API. */
64
+ class AnthropicAgent extends Agent {
65
+ constructor(id, role, connection, fetchFn = (url, init) => fetch(url, init)) {
66
+ super(id, role, new AnthropicClient(connection, fetchFn));
67
+ }
68
+ }
69
+ export { AnthropicAgent, AnthropicClient };
70
+ //# sourceMappingURL=AnthropicAgent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnthropicAgent.js","sourceRoot":"","sources":["../../../src/actors/agents/AnthropicAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAA6B,MAAM,eAAe,CAAC;AAYhE,MAAM,SAAS,GAAG,YAAY,CAAC;AAC/B,MAAM,eAAe,GAAG,YAAY,CAAC;AACrC,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEhC;;;;2DAI2D;AAC3D,MAAM,eAAgB,SAAQ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I,EAAE,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACnH,CAAC;CAEJ;AAED,yDAAyD;AACzD,MAAM,cAAe,SAAQ,KAAK;IAE9B,YAAY,EAAW,EAAE,IAAa,EAAE,UAAgC,EAC5D,OAAO,GAAa,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC;QAC3D,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,eAAe,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9D,CAAC;CAEJ;AAED,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA"}
@@ -0,0 +1,22 @@
1
+ import { Agent, AgentRequest } from "anbaric-tsapi";
2
+ type FetchFn = (url: string, init: RequestInit) => Promise<Response>;
3
+ type GeminiConnection = {
4
+ apiKey: string;
5
+ model: string;
6
+ baseUrl?: string;
7
+ };
8
+ declare const geminiSchema: (schema: any) => any;
9
+ declare class GeminiClient extends Agent.Client {
10
+ private connection;
11
+ private fetchFn;
12
+ private baseUrl;
13
+ constructor(connection: GeminiConnection, fetchFn?: FetchFn);
14
+ generate(request: AgentRequest): Promise<Record<string, any>>;
15
+ private conversation;
16
+ }
17
+ declare class GeminiAgent extends Agent {
18
+ constructor(id: string, role: string, connection: GeminiConnection, fetchFn?: FetchFn);
19
+ }
20
+ export { GeminiAgent, GeminiClient, geminiSchema };
21
+ export type { GeminiConnection };
22
+ //# sourceMappingURL=GeminiAgent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeminiAgent.d.ts","sourceRoot":"","sources":["../../../src/actors/agents/GeminiAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAgB,YAAY,EAAC,MAAM,eAAe,CAAC;AAEhE,KAAK,OAAO,GAAG,CAAC,GAAG,EAAG,MAAM,EAAE,IAAI,EAAG,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEvE,KAAK,gBAAgB,GAAG;IACpB,MAAM,EAAG,MAAM,CAAC;IAChB,KAAK,EAAG,MAAM,CAAC;IACf,OAAO,CAAC,EAAG,MAAM,CAAC;CACrB,CAAC;AAOF,QAAA,MAAM,YAAY,WAAa,GAAG,KAAI,GAcrC,CAAC;AAMF,cAAM,YAAa,SAAQ,KAAK,CAAC,MAAM;IAIvB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,OAAO;IAH3B,OAAO,CAAC,OAAO,CAAU;IAEzB,YAAoB,UAAU,EAAG,gBAAgB,EAC7B,OAAO,GAAG,OAAyC,EAGtE;IAEK,QAAQ,CAAC,OAAO,EAAG,YAAY,GAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAiCpE;IAED,OAAO,CAAC,YAAY;CASvB;AAGD,cAAM,WAAY,SAAQ,KAAK;IAE3B,YAAY,EAAE,EAAG,MAAM,EAAE,IAAI,EAAG,MAAM,EAAE,UAAU,EAAG,gBAAgB,EACzD,OAAO,GAAG,OAAyC,EAE9D;CAEJ;AAED,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,CAAA;AAClD,YAAY,EAAE,gBAAgB,EAAE,CAAA"}
@@ -0,0 +1,83 @@
1
+ import { Agent } from "anbaric-tsapi";
2
+ /* Gemini's responseSchema is an OpenAPI subset, not JSON Schema: its types are
3
+ an upper-case enum and it rejects keywords it doesn't know (additionalProperties
4
+ among them). Convert rather than pass through, keeping only what it accepts. */
5
+ const CARRIED = ["format", "description", "nullable", "enum", "required"];
6
+ const geminiSchema = (schema) => {
7
+ if (!schema || typeof schema !== "object")
8
+ return schema;
9
+ const converted = {};
10
+ if (typeof schema.type === "string")
11
+ converted.type = schema.type.toUpperCase();
12
+ for (const key of CARRIED) {
13
+ if (schema[key] !== undefined)
14
+ converted[key] = schema[key];
15
+ }
16
+ if (schema.items)
17
+ converted.items = geminiSchema(schema.items);
18
+ if (schema.properties) {
19
+ converted.properties = Object.fromEntries(Object.entries(schema.properties).map(([key, property]) => [key, geminiSchema(property)]));
20
+ }
21
+ return converted;
22
+ };
23
+ /* The functional half of a Gemini agent. Two things differ from the
24
+ OpenAI-compatible shape: the system prompt is its own field (systemInstruction)
25
+ and the assistant's turns are named "model"; structured output is asked for
26
+ with a JSON response mime type plus the converted schema. */
27
+ class GeminiClient extends Agent.Client {
28
+ connection;
29
+ fetchFn;
30
+ baseUrl;
31
+ constructor(connection, fetchFn = (url, init) => fetch(url, init)) {
32
+ super();
33
+ this.connection = connection;
34
+ this.fetchFn = fetchFn;
35
+ this.baseUrl = connection.baseUrl ?? "https://generativelanguage.googleapis.com/v1beta";
36
+ }
37
+ async generate(request) {
38
+ const system = request.messages.filter(message => message.role === "system")
39
+ .map(message => message.content).join("\n\n");
40
+ // The key travels as a header, never in the URL, so it stays out of
41
+ // request logs and browser history.
42
+ const response = await this.fetchFn(`${this.baseUrl}/models/${encodeURIComponent(this.connection.model)}:generateContent`, {
43
+ method: "POST",
44
+ headers: {
45
+ "content-type": "application/json",
46
+ "x-goog-api-key": this.connection.apiKey,
47
+ },
48
+ body: JSON.stringify({
49
+ ...(system ? { systemInstruction: { parts: [{ text: system }] } } : {}),
50
+ contents: this.conversation(request.messages),
51
+ generationConfig: {
52
+ responseMimeType: "application/json",
53
+ responseSchema: geminiSchema(request.outputSchema),
54
+ },
55
+ }),
56
+ });
57
+ if (!response.ok) {
58
+ const problem = await response.json().catch(() => ({}));
59
+ throw new Error(`The Gemini request failed with status ${response.status}${problem.error?.message ? `: ${problem.error.message}` : ""}`);
60
+ }
61
+ const body = await response.json();
62
+ const text = body.candidates?.[0]?.content?.parts?.map(part => part.text).find(part => typeof part === "string");
63
+ if (typeof text !== "string")
64
+ throw new Error("The Gemini response carried no structured content");
65
+ return JSON.parse(text);
66
+ }
67
+ conversation(messages) {
68
+ return messages
69
+ .filter(message => message.role !== "system")
70
+ .map(message => ({
71
+ role: message.role === "assistant" ? "model" : "user",
72
+ parts: [{ text: message.content }],
73
+ }));
74
+ }
75
+ }
76
+ /* A light agent backed by the Gemini generative language API. */
77
+ class GeminiAgent extends Agent {
78
+ constructor(id, role, connection, fetchFn = (url, init) => fetch(url, init)) {
79
+ super(id, role, new GeminiClient(connection, fetchFn));
80
+ }
81
+ }
82
+ export { GeminiAgent, GeminiClient, geminiSchema };
83
+ //# sourceMappingURL=GeminiAgent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeminiAgent.js","sourceRoot":"","sources":["../../../src/actors/agents/GeminiAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAA6B,MAAM,eAAe,CAAC;AAUhE;;kFAEkF;AAClF,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,CAAU,CAAC;AAEnF,MAAM,YAAY,GAAG,CAAC,MAAY,EAAQ,EAAE;IACxC,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC;IAEzD,MAAM,SAAS,GAAyB,EAAE,CAAC;IAC3C,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ;QAAE,SAAS,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;IAChF,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;QACxB,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,SAAS;YAAE,SAAS,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAChE,CAAC;IACD,IAAI,MAAM,CAAC,KAAK;QAAE,SAAS,CAAC,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/D,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACpB,SAAS,C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O,YAAY,CAAC,QAA8B;QAC/C,OAAO,QAAQ;aACV,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,QAAQ,CAAC;aAC5C,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACb,IAAI,EAAE,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;YACrD,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;SACrC,CAAC,CAAC,CAAC;IACZ,CAAC;CAEJ;AAED,iEAAiE;AACjE,MAAM,WAAY,SAAQ,KAAK;IAE3B,YAAY,EAAW,EAAE,IAAa,EAAE,UAA6B,EACzD,OAAO,GAAa,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC;QAC3D,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;IAC3D,CAAC;CAEJ;AAED,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,CAAA"}
package/dist/index.d.ts CHANGED
@@ -3,6 +3,8 @@ export * from "./actions/RemoteLLMAgenticAction.js";
3
3
  export * from "./actors/Code.js";
4
4
  export * from "./actors/Human.js";
5
5
  export * from "./actors/agents/OpenAIAgent.js";
6
+ export * from "./actors/agents/AnthropicAgent.js";
7
+ export * from "./actors/agents/GeminiAgent.js";
6
8
  export * from "./auditing/AuditorFactory.js";
7
9
  export * from "./auditing/ConsoleAuditor.js";
8
10
  export * from "./entitlements/PermissiveAuthorizer.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qCAAqC,CAAC;AACpD,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAm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AACjE,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC"}
package/dist/index.js CHANGED
@@ -3,6 +3,8 @@ export * from "./actions/RemoteLLMAgenticAction.js";
3
3
  export * from "./actors/Code.js";
4
4
  export * from "./actors/Human.js";
5
5
  export * from "./actors/agents/OpenAIAgent.js";
6
+ export * from "./actors/agents/AnthropicAgent.js";
7
+ export * from "./actors/agents/GeminiAgent.js";
6
8
  export * from "./auditing/AuditorFactory.js";
7
9
  export * from "./auditing/ConsoleAuditor.js";
8
10
  export * from "./entitlements/PermissiveAuthorizer.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qCAAqC,CAAC;AACpD,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,mDAAmD,CAAC;AAClE,cAAc,kDAAkD,CAAC;AACjE,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qCAAqC,CAAC;AACpD,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,mDAAmD,CAAC;AAClE,cAAc,kDAAkD,CAAC;AACjE,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anbaric-state-machine",
3
- "version": "1.41.0",
3
+ "version": "1.43.0",
4
4
  "description": "This is the state machine library that one can use to add state management to an application. It will, by default, be locally runnable but can deployed to the Anbaric Cloud via the CLI",
5
5
  "license": "MIT",
6
6
  "author": "chris@anbaric.ai",
@@ -24,8 +24,8 @@
24
24
  "typescript": "^7.0.2"
25
25
  },
26
26
  "dependencies": {
27
- "anbaric-impl-cloud": "^1.41.0",
28
- "anbaric-tsapi": "^1.41.0"
27
+ "anbaric-impl-cloud": "^1.43.0",
28
+ "anbaric-tsapi": "^1.43.0"
29
29
  },
30
30
  "files": [
31
31
  "dist"