@ai-matrx/agents 0.38.3 → 0.40.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/CHANGELOG.md +27 -0
- package/dist/catalog/index.cjs +3 -1
- package/dist/catalog/index.cjs.map +1 -1
- package/dist/catalog/index.d.cts +2 -2
- package/dist/catalog/index.d.ts +2 -2
- package/dist/catalog/index.js +3 -1
- package/dist/catalog/index.js.map +1 -1
- package/dist/catalog/native/index.cjs +4 -1
- package/dist/catalog/native/index.cjs.map +1 -1
- package/dist/catalog/native/index.d.cts +8 -3
- package/dist/catalog/native/index.d.ts +8 -3
- package/dist/catalog/native/index.js +4 -1
- package/dist/catalog/native/index.js.map +1 -1
- package/dist/catalog/react/index.cjs +1 -0
- package/dist/catalog/react/index.cjs.map +1 -1
- package/dist/catalog/react/index.d.cts +13 -1
- package/dist/catalog/react/index.d.ts +13 -1
- package/dist/catalog/react/index.js +1 -0
- package/dist/catalog/react/index.js.map +1 -1
- package/dist/content-transfer/index.cjs.map +1 -1
- package/dist/content-transfer/index.js.map +1 -1
- package/dist/content-transfer/react/index.cjs.map +1 -1
- package/dist/content-transfer/react/index.js.map +1 -1
- package/dist/context/index.cjs +3 -23
- package/dist/context/index.cjs.map +1 -1
- package/dist/context/index.d.cts +10 -13
- package/dist/context/index.d.ts +10 -13
- package/dist/context/index.js +5 -23
- package/dist/context/index.js.map +1 -1
- package/dist/context/react/index.cjs +263 -97
- package/dist/context/react/index.cjs.map +1 -1
- package/dist/context/react/index.d.cts +140 -15
- package/dist/context/react/index.d.ts +140 -15
- package/dist/context/react/index.js +266 -100
- package/dist/context/react/index.js.map +1 -1
- package/dist/generated/api-types.cjs.map +1 -1
- package/dist/generated/api-types.d.cts +1 -1
- package/dist/generated/api-types.d.ts +1 -1
- package/dist/index.cjs +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -6
- package/dist/index.d.ts +9 -6
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/{keys.generated-BdQt09qH.d.cts → keys.generated-myjGAtI0.d.cts} +4 -4
- package/dist/{keys.generated-BdQt09qH.d.ts → keys.generated-myjGAtI0.d.ts} +4 -4
- package/dist/mandates/index.cjs +2 -2
- package/dist/mandates/index.cjs.map +1 -1
- package/dist/mandates/index.d.cts +2 -2
- package/dist/mandates/index.d.ts +2 -2
- package/dist/mandates/index.js +2 -2
- package/dist/mandates/index.js.map +1 -1
- package/dist/matrx/index.d.cts +1 -1
- package/dist/matrx/index.d.ts +1 -1
- package/dist/{orchestra-zpGHwOag.d.cts → orchestra-CiaTu58J.d.cts} +7 -0
- package/dist/{orchestra-zpGHwOag.d.ts → orchestra-CiaTu58J.d.ts} +7 -0
- package/generated/api-types.ts +1 -1
- package/mandates/snapshots/keys.0.38.4.json +653 -0
- package/mandates/snapshots/keys.0.39.0.json +653 -0
- package/mandates/snapshots/keys.0.40.0.json +653 -0
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -8,7 +8,7 @@ export { ApiTargetLogContext, BackendApiError, BackendApiErrorData, BackendError
|
|
|
8
8
|
export { F as FollowRuntimeOperationOptions, a as FollowRuntimeOperationToEndOptions, b as FollowRuntimeOperationToEndResult, M as MatrxAgentStartRequest, c as MatrxCancelResponse, d as MatrxChatMessage, e as MatrxCompletedRun, f as MatrxContextAnchor, g as MatrxConversationContinueRequest, h as MatrxConversationResumeRequest, i as MatrxConversationStart, j as MatrxEphemeralConversation, k as MatrxJsonObject, l as MatrxJsonValue, m as MatrxMandateStartRequest, n as MatrxOperationEventsPage, o as MatrxOperationFollowEvent, p as MatrxOperationStatusResponse, q as MatrxOperationsByLinkResponse, r as MatrxRequestScope, s as MatrxRunError, t as MatrxRunHandle, u as MatrxRuntimeExecutionStatus, v as MatrxRuntimeOperationEvent, w as MatrxRuntimeOperationView, x as MatrxStoredConversationContinue, y as MatrxStoredConversationCreate, z as MatrxStreamCallOptions, A as MatrxTurnFields, R as RunAgentToCompletionOptions, T as TERMINAL_MATRX_RUNTIME_STATUSES, B as cancelAgentRun, C as continueAgentConversation, D as continueEphemeralConversationStart, E as continueStoredConversationStart, G as followRuntimeOperationEvents, H as followRuntimeOperationToEnd, I as getRuntimeOperationStatus, J as getRuntimeOperationsByLink, K as listRuntimeOperationEvents, L as mintMatrxConversationId, N as newEphemeralConversationStart, O as newStoredConversationStart, P as rejoinRuntimeOperation, Q as resumeAgentConversation, S as runAgentToCompletion, U as startAgentRun, V as startMandateRun } from './operations-C9QvBH_2.cjs';
|
|
9
9
|
import '@ai-matrx/data';
|
|
10
10
|
import '@ai-matrx/data/net';
|
|
11
|
-
import './keys.generated-
|
|
11
|
+
import './keys.generated-myjGAtI0.cjs';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Media reference roles — the builder's side of the one vocabulary.
|
|
@@ -114,6 +114,8 @@ declare function referenceRoleCaption(role: unknown, name: unknown): string | nu
|
|
|
114
114
|
/** The minimum variable shape this derivation reads (a superset is fine). */
|
|
115
115
|
interface RunInputVariable {
|
|
116
116
|
name: string;
|
|
117
|
+
/** What the person called it ("Normal Text") — `name` is the `{{normal_text}}` key. */
|
|
118
|
+
label?: string | null;
|
|
117
119
|
defaultValue?: unknown;
|
|
118
120
|
helpText?: string | null;
|
|
119
121
|
required?: boolean | null;
|
|
@@ -160,14 +162,15 @@ declare function partitionControlVariables<T extends RunInputVariable>(defs: rea
|
|
|
160
162
|
/** The order every variable form renders in. Returns the same array when already ordered. */
|
|
161
163
|
declare function orderVariablesForForm<T extends RunInputVariable>(defs: T[]): T[];
|
|
162
164
|
/**
|
|
163
|
-
* The label
|
|
164
|
-
*
|
|
165
|
-
*
|
|
165
|
+
* The label every screen shows for a variable: the person's own label
|
|
166
|
+
* ("Normal Text"), else — for a media variable that fills a reference role —
|
|
167
|
+
* the role's ask ("Style reference"), else the key through THE humanizer
|
|
168
|
+
* (`@ai-matrx/kit/text-case` `humanizeIdentifier`). Never the raw key.
|
|
166
169
|
*/
|
|
167
|
-
declare function variableRunLabel(variable: RunInputVariable, formatName
|
|
170
|
+
declare function variableRunLabel(variable: RunInputVariable, formatName?: (name: string) => string): string;
|
|
168
171
|
/** The hint under / beside a variable: its own help text, else the role's line. */
|
|
169
172
|
declare function variableRunHint(variable: RunInputVariable): string | undefined;
|
|
170
173
|
/** Derive the ordered, grouped, labelled run inputs for an agent's variables. */
|
|
171
|
-
declare function deriveRunInputs<V extends RunInputVariable>(defs: readonly V[] | null | undefined, formatName
|
|
174
|
+
declare function deriveRunInputs<V extends RunInputVariable>(defs: readonly V[] | null | undefined, formatName?: (name: string) => string): RunInput<V>[];
|
|
172
175
|
|
|
173
176
|
export { AUDIO_REFERENCE_ROLES, type AudioReferenceRole, IMAGE_REFERENCE_ROLES, IMAGE_ROLE_META, type ImageReferenceRole, type ImageRoleLimits, type ImageRoleMeta, type ImageRoleVerdict, type ReferenceRole, type RunInput, type RunInputGroup, type RunInputMediaKind, type RunInputVariable, VIDEO_IMAGE_ROLES, VIDEO_REFERENCE_ROLES, type VideoReferenceRole, deriveRunInputs, imageRoleVerdict, isControlVariable, isImageReferenceRole, isReferenceRole, namedReferenceVerdict, normalizeReferenceName, orderVariablesForForm, partitionControlVariables, readImageRoleLimits, referenceRoleCaption, roleTakesName, rolesFor, variableNameOfImageUrl, variableNameOfMediaUrl, variableRunHint, variableRunLabel };
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { ApiTargetLogContext, BackendApiError, BackendApiErrorData, BackendError
|
|
|
8
8
|
export { F as FollowRuntimeOperationOptions, a as FollowRuntimeOperationToEndOptions, b as FollowRuntimeOperationToEndResult, M as MatrxAgentStartRequest, c as MatrxCancelResponse, d as MatrxChatMessage, e as MatrxCompletedRun, f as MatrxContextAnchor, g as MatrxConversationContinueRequest, h as MatrxConversationResumeRequest, i as MatrxConversationStart, j as MatrxEphemeralConversation, k as MatrxJsonObject, l as MatrxJsonValue, m as MatrxMandateStartRequest, n as MatrxOperationEventsPage, o as MatrxOperationFollowEvent, p as MatrxOperationStatusResponse, q as MatrxOperationsByLinkResponse, r as MatrxRequestScope, s as MatrxRunError, t as MatrxRunHandle, u as MatrxRuntimeExecutionStatus, v as MatrxRuntimeOperationEvent, w as MatrxRuntimeOperationView, x as MatrxStoredConversationContinue, y as MatrxStoredConversationCreate, z as MatrxStreamCallOptions, A as MatrxTurnFields, R as RunAgentToCompletionOptions, T as TERMINAL_MATRX_RUNTIME_STATUSES, B as cancelAgentRun, C as continueAgentConversation, D as continueEphemeralConversationStart, E as continueStoredConversationStart, G as followRuntimeOperationEvents, H as followRuntimeOperationToEnd, I as getRuntimeOperationStatus, J as getRuntimeOperationsByLink, K as listRuntimeOperationEvents, L as mintMatrxConversationId, N as newEphemeralConversationStart, O as newStoredConversationStart, P as rejoinRuntimeOperation, Q as resumeAgentConversation, S as runAgentToCompletion, U as startAgentRun, V as startMandateRun } from './operations-C3iHFcnt.js';
|
|
9
9
|
import '@ai-matrx/data';
|
|
10
10
|
import '@ai-matrx/data/net';
|
|
11
|
-
import './keys.generated-
|
|
11
|
+
import './keys.generated-myjGAtI0.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Media reference roles — the builder's side of the one vocabulary.
|
|
@@ -114,6 +114,8 @@ declare function referenceRoleCaption(role: unknown, name: unknown): string | nu
|
|
|
114
114
|
/** The minimum variable shape this derivation reads (a superset is fine). */
|
|
115
115
|
interface RunInputVariable {
|
|
116
116
|
name: string;
|
|
117
|
+
/** What the person called it ("Normal Text") — `name` is the `{{normal_text}}` key. */
|
|
118
|
+
label?: string | null;
|
|
117
119
|
defaultValue?: unknown;
|
|
118
120
|
helpText?: string | null;
|
|
119
121
|
required?: boolean | null;
|
|
@@ -160,14 +162,15 @@ declare function partitionControlVariables<T extends RunInputVariable>(defs: rea
|
|
|
160
162
|
/** The order every variable form renders in. Returns the same array when already ordered. */
|
|
161
163
|
declare function orderVariablesForForm<T extends RunInputVariable>(defs: T[]): T[];
|
|
162
164
|
/**
|
|
163
|
-
* The label
|
|
164
|
-
*
|
|
165
|
-
*
|
|
165
|
+
* The label every screen shows for a variable: the person's own label
|
|
166
|
+
* ("Normal Text"), else — for a media variable that fills a reference role —
|
|
167
|
+
* the role's ask ("Style reference"), else the key through THE humanizer
|
|
168
|
+
* (`@ai-matrx/kit/text-case` `humanizeIdentifier`). Never the raw key.
|
|
166
169
|
*/
|
|
167
|
-
declare function variableRunLabel(variable: RunInputVariable, formatName
|
|
170
|
+
declare function variableRunLabel(variable: RunInputVariable, formatName?: (name: string) => string): string;
|
|
168
171
|
/** The hint under / beside a variable: its own help text, else the role's line. */
|
|
169
172
|
declare function variableRunHint(variable: RunInputVariable): string | undefined;
|
|
170
173
|
/** Derive the ordered, grouped, labelled run inputs for an agent's variables. */
|
|
171
|
-
declare function deriveRunInputs<V extends RunInputVariable>(defs: readonly V[] | null | undefined, formatName
|
|
174
|
+
declare function deriveRunInputs<V extends RunInputVariable>(defs: readonly V[] | null | undefined, formatName?: (name: string) => string): RunInput<V>[];
|
|
172
175
|
|
|
173
176
|
export { AUDIO_REFERENCE_ROLES, type AudioReferenceRole, IMAGE_REFERENCE_ROLES, IMAGE_ROLE_META, type ImageReferenceRole, type ImageRoleLimits, type ImageRoleMeta, type ImageRoleVerdict, type ReferenceRole, type RunInput, type RunInputGroup, type RunInputMediaKind, type RunInputVariable, VIDEO_IMAGE_ROLES, VIDEO_REFERENCE_ROLES, type VideoReferenceRole, deriveRunInputs, imageRoleVerdict, isControlVariable, isImageReferenceRole, isReferenceRole, namedReferenceVerdict, normalizeReferenceName, orderVariablesForForm, partitionControlVariables, readImageRoleLimits, referenceRoleCaption, roleTakesName, rolesFor, variableNameOfImageUrl, variableNameOfMediaUrl, variableRunHint, variableRunLabel };
|
package/dist/index.js
CHANGED
|
@@ -3299,6 +3299,7 @@ function referenceRoleCaption(role, name) {
|
|
|
3299
3299
|
}
|
|
3300
3300
|
|
|
3301
3301
|
// variables/run-inputs.ts
|
|
3302
|
+
import { humanizeIdentifier } from "@ai-matrx/kit/text-case";
|
|
3302
3303
|
var MEDIA_KINDS = ["image", "video", "audio", "document", "youtube"];
|
|
3303
3304
|
function isControlVariable(def) {
|
|
3304
3305
|
return typeof def.control?.key === "string" && def.control.key.length > 0;
|
|
@@ -3321,16 +3322,18 @@ function roleOf(variable) {
|
|
|
3321
3322
|
const roled = type === "image" || type === "video" || type === "audio";
|
|
3322
3323
|
return roled && isReferenceRole(role) ? role : null;
|
|
3323
3324
|
}
|
|
3324
|
-
function variableRunLabel(variable, formatName) {
|
|
3325
|
+
function variableRunLabel(variable, formatName = humanizeIdentifier) {
|
|
3326
|
+
const own = (variable.label ?? "").trim();
|
|
3327
|
+
if (own !== "") return own;
|
|
3325
3328
|
const role = roleOf(variable);
|
|
3326
|
-
return role ? IMAGE_ROLE_META[role].ask : formatName(variable.name);
|
|
3329
|
+
return role ? IMAGE_ROLE_META[role].ask : formatName(variable.name) || variable.name;
|
|
3327
3330
|
}
|
|
3328
3331
|
function variableRunHint(variable) {
|
|
3329
3332
|
if (variable.helpText) return variable.helpText;
|
|
3330
3333
|
const role = roleOf(variable);
|
|
3331
3334
|
return role ? IMAGE_ROLE_META[role].explanation : void 0;
|
|
3332
3335
|
}
|
|
3333
|
-
function deriveRunInputs(defs, formatName) {
|
|
3336
|
+
function deriveRunInputs(defs, formatName = humanizeIdentifier) {
|
|
3334
3337
|
return orderVariablesForForm([...defs ?? []]).map((variable) => {
|
|
3335
3338
|
const type = variable.customComponent?.type ?? "textarea";
|
|
3336
3339
|
const options = variable.customComponent?.options ?? void 0;
|