@almadar/std 3.13.1 → 3.14.1
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/behaviors/exports/atoms/std-agent-activity-log.orb +11 -3
- package/behaviors/exports/atoms/std-agent-step-progress.orb +162 -23
- package/behaviors/exports/atoms/std-agent-tool-call.orb +0 -499
- package/behaviors/exports/molecules/std-agent-fix-loop.orb +173 -25
- package/behaviors/exports/molecules/std-agent-learner.orb +15 -550
- package/behaviors/exports/molecules/std-agent-planner.orb +10 -530
- package/behaviors/exports/molecules/std-agent-rag.orb +4 -1
- package/behaviors/exports/molecules/std-agent-tool-loop.orb +169 -573
- package/behaviors/exports/organisms/std-agent-builder.orb +905 -1453
- package/behaviors/exports/organisms/std-agent-pipeline.orb +806 -1502
- package/behaviors/exports/organisms/std-agent-reviewer.orb +4 -1
- package/behaviors/exports/validation-report.json +2 -2
- package/dist/behaviors/behaviors-registry.json +11173 -5568
- package/dist/behaviors/exports/atoms/std-agent-activity-log.orb +11 -3
- package/dist/behaviors/exports/atoms/std-agent-step-progress.orb +162 -23
- package/dist/behaviors/exports/atoms/std-agent-tool-call.orb +0 -499
- package/dist/behaviors/exports/molecules/std-agent-fix-loop.orb +173 -25
- package/dist/behaviors/exports/molecules/std-agent-learner.orb +15 -550
- package/dist/behaviors/exports/molecules/std-agent-planner.orb +10 -530
- package/dist/behaviors/exports/molecules/std-agent-rag.orb +4 -1
- package/dist/behaviors/exports/molecules/std-agent-tool-loop.orb +169 -573
- package/dist/behaviors/exports/organisms/std-agent-builder.orb +905 -1453
- package/dist/behaviors/exports/organisms/std-agent-pipeline.orb +806 -1502
- package/dist/behaviors/exports/organisms/std-agent-reviewer.orb +4 -1
- package/dist/behaviors/exports/validation-report.json +2 -2
- package/dist/behaviors/exports-reader.js +257 -302
- package/dist/behaviors/exports-reader.js.map +1 -1
- package/dist/behaviors/functions/index.js +257 -302
- package/dist/behaviors/functions/index.js.map +1 -1
- package/dist/behaviors/index.js +257 -302
- package/dist/behaviors/index.js.map +1 -1
- package/dist/behaviors/query.js +257 -302
- package/dist/behaviors/query.js.map +1 -1
- package/dist/behaviors-registry.json +11173 -5568
- package/dist/exports/atoms/std-agent-activity-log.orb +11 -3
- package/dist/exports/atoms/std-agent-step-progress.orb +162 -23
- package/dist/exports/atoms/std-agent-tool-call.orb +0 -499
- package/dist/exports/molecules/std-agent-fix-loop.orb +173 -25
- package/dist/exports/molecules/std-agent-learner.orb +15 -550
- package/dist/exports/molecules/std-agent-planner.orb +10 -530
- package/dist/exports/molecules/std-agent-rag.orb +4 -1
- package/dist/exports/molecules/std-agent-tool-loop.orb +169 -573
- package/dist/exports/organisms/std-agent-builder.orb +905 -1453
- package/dist/exports/organisms/std-agent-pipeline.orb +806 -1502
- package/dist/exports/organisms/std-agent-reviewer.orb +4 -1
- package/dist/exports/validation-report.json +2 -2
- package/dist/index.js +257 -302
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -20843,187 +20843,9 @@ function stdAgentCompletion(params = {}) {
|
|
|
20843
20843
|
};
|
|
20844
20844
|
return makeOrbital(`${c.entityName}Orbital`, entity, [modalTrait, notifTrait, agentTrait], [page]);
|
|
20845
20845
|
}
|
|
20846
|
-
function resolve92(params) {
|
|
20847
|
-
const entityName = params.entityName ?? "ActivityEntry";
|
|
20848
|
-
const p = plural(entityName);
|
|
20849
|
-
const requiredFields = [
|
|
20850
|
-
{ name: "action", type: "string", default: "" },
|
|
20851
|
-
{ name: "detail", type: "string", default: "" },
|
|
20852
|
-
{ name: "status", type: "string", default: "pending" },
|
|
20853
|
-
{ name: "timestamp", type: "string", default: "" },
|
|
20854
|
-
{ name: "duration", type: "number", default: 0 }
|
|
20855
|
-
];
|
|
20856
|
-
const baseFields = params.fields ?? [];
|
|
20857
|
-
const existingNames = new Set(baseFields.map((f) => f.name));
|
|
20858
|
-
const mergedFields = [
|
|
20859
|
-
...baseFields,
|
|
20860
|
-
...requiredFields.filter((f) => !existingNames.has(f.name))
|
|
20861
|
-
];
|
|
20862
|
-
const fields = ensureIdField(mergedFields);
|
|
20863
|
-
return {
|
|
20864
|
-
entityName,
|
|
20865
|
-
fields,
|
|
20866
|
-
persistence: params.persistence ?? "persistent",
|
|
20867
|
-
traitName: `${entityName}Log`,
|
|
20868
|
-
pluralName: p,
|
|
20869
|
-
pageName: params.pageName ?? `${entityName}Page`,
|
|
20870
|
-
pagePath: params.pagePath ?? `/${p.toLowerCase()}`,
|
|
20871
|
-
isInitial: params.isInitial ?? false
|
|
20872
|
-
};
|
|
20873
|
-
}
|
|
20874
|
-
function buildEntity78(c) {
|
|
20875
|
-
return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
|
|
20876
|
-
}
|
|
20877
|
-
function buildTrait71(c) {
|
|
20878
|
-
const { entityName } = c;
|
|
20879
|
-
const loggingUI = {
|
|
20880
|
-
type: "stack",
|
|
20881
|
-
direction: "vertical",
|
|
20882
|
-
gap: "lg",
|
|
20883
|
-
children: [
|
|
20884
|
-
{
|
|
20885
|
-
type: "stack",
|
|
20886
|
-
direction: "horizontal",
|
|
20887
|
-
gap: "sm",
|
|
20888
|
-
justify: "space-between",
|
|
20889
|
-
align: "center",
|
|
20890
|
-
children: [
|
|
20891
|
-
{
|
|
20892
|
-
type: "stack",
|
|
20893
|
-
direction: "horizontal",
|
|
20894
|
-
gap: "sm",
|
|
20895
|
-
align: "center",
|
|
20896
|
-
children: [
|
|
20897
|
-
{ type: "icon", name: "activity", size: "lg" },
|
|
20898
|
-
{ type: "typography", content: "Activity Log", variant: "h2" }
|
|
20899
|
-
]
|
|
20900
|
-
},
|
|
20901
|
-
{ type: "button", label: "Clear", event: "CLEAR", variant: "ghost", icon: "trash" }
|
|
20902
|
-
]
|
|
20903
|
-
},
|
|
20904
|
-
{ type: "divider" },
|
|
20905
|
-
{
|
|
20906
|
-
type: "timeline",
|
|
20907
|
-
entity: entityName,
|
|
20908
|
-
emptyIcon: "activity",
|
|
20909
|
-
emptyTitle: "No activity yet",
|
|
20910
|
-
emptyDescription: "Agent actions will appear here as they occur.",
|
|
20911
|
-
renderItem: ["fn", "item", {
|
|
20912
|
-
type: "stack",
|
|
20913
|
-
direction: "vertical",
|
|
20914
|
-
gap: "xs",
|
|
20915
|
-
children: [
|
|
20916
|
-
{
|
|
20917
|
-
type: "stack",
|
|
20918
|
-
direction: "horizontal",
|
|
20919
|
-
gap: "sm",
|
|
20920
|
-
align: "center",
|
|
20921
|
-
children: [
|
|
20922
|
-
{ type: "badge", label: "@item.status" },
|
|
20923
|
-
{ type: "typography", variant: "h4", content: "@item.action" }
|
|
20924
|
-
]
|
|
20925
|
-
},
|
|
20926
|
-
{ type: "typography", variant: "body", color: "muted", content: "@item.detail" },
|
|
20927
|
-
{
|
|
20928
|
-
type: "stack",
|
|
20929
|
-
direction: "horizontal",
|
|
20930
|
-
gap: "sm",
|
|
20931
|
-
align: "center",
|
|
20932
|
-
children: [
|
|
20933
|
-
{ type: "typography", variant: "caption", color: "muted", content: "@item.timestamp" },
|
|
20934
|
-
{ type: "badge", label: "@item.duration", variant: "outline" }
|
|
20935
|
-
]
|
|
20936
|
-
}
|
|
20937
|
-
]
|
|
20938
|
-
}]
|
|
20939
|
-
}
|
|
20940
|
-
]
|
|
20941
|
-
};
|
|
20942
|
-
return {
|
|
20943
|
-
name: c.traitName,
|
|
20944
|
-
linkedEntity: entityName,
|
|
20945
|
-
category: "interaction",
|
|
20946
|
-
emits: [
|
|
20947
|
-
{ event: "LOG_ENTRY", scope: "external", payload: [
|
|
20948
|
-
{ name: "action", type: "string" },
|
|
20949
|
-
{ name: "detail", type: "string" },
|
|
20950
|
-
{ name: "status", type: "string" }
|
|
20951
|
-
] }
|
|
20952
|
-
],
|
|
20953
|
-
listens: [
|
|
20954
|
-
{ event: "LOG_ENTRY", triggers: "LOG_ENTRY", scope: "external" }
|
|
20955
|
-
],
|
|
20956
|
-
stateMachine: {
|
|
20957
|
-
states: [
|
|
20958
|
-
{ name: "logging", isInitial: true }
|
|
20959
|
-
],
|
|
20960
|
-
events: [
|
|
20961
|
-
{ key: "INIT", name: "Initialize" },
|
|
20962
|
-
{ key: "LOG_ENTRY", name: "Log Entry", payload: [
|
|
20963
|
-
{ name: "action", type: "string", required: true },
|
|
20964
|
-
{ name: "detail", type: "string", required: true },
|
|
20965
|
-
{ name: "status", type: "string", required: true }
|
|
20966
|
-
] },
|
|
20967
|
-
{ key: "CLEAR", name: "Clear Log" }
|
|
20968
|
-
],
|
|
20969
|
-
transitions: [
|
|
20970
|
-
{
|
|
20971
|
-
from: "logging",
|
|
20972
|
-
to: "logging",
|
|
20973
|
-
event: "INIT",
|
|
20974
|
-
effects: [
|
|
20975
|
-
["fetch", entityName],
|
|
20976
|
-
["render-ui", "main", loggingUI]
|
|
20977
|
-
]
|
|
20978
|
-
},
|
|
20979
|
-
{
|
|
20980
|
-
from: "logging",
|
|
20981
|
-
to: "logging",
|
|
20982
|
-
event: "LOG_ENTRY",
|
|
20983
|
-
effects: [
|
|
20984
|
-
["persist", "create", entityName, {
|
|
20985
|
-
action: "@payload.action",
|
|
20986
|
-
detail: "@payload.detail",
|
|
20987
|
-
status: "@payload.status",
|
|
20988
|
-
timestamp: "@now"
|
|
20989
|
-
}],
|
|
20990
|
-
["fetch", entityName],
|
|
20991
|
-
["render-ui", "main", loggingUI]
|
|
20992
|
-
]
|
|
20993
|
-
},
|
|
20994
|
-
{
|
|
20995
|
-
from: "logging",
|
|
20996
|
-
to: "logging",
|
|
20997
|
-
event: "CLEAR",
|
|
20998
|
-
effects: [
|
|
20999
|
-
["persist", "delete", entityName],
|
|
21000
|
-
["fetch", entityName],
|
|
21001
|
-
["render-ui", "main", loggingUI]
|
|
21002
|
-
]
|
|
21003
|
-
}
|
|
21004
|
-
]
|
|
21005
|
-
}
|
|
21006
|
-
};
|
|
21007
|
-
}
|
|
21008
|
-
function buildPage72(c) {
|
|
21009
|
-
return makePage({ name: c.pageName, path: c.pagePath, traitName: c.traitName, isInitial: c.isInitial });
|
|
21010
|
-
}
|
|
21011
|
-
function stdAgentActivityLogEntity(params = {}) {
|
|
21012
|
-
return buildEntity78(resolve92(params));
|
|
21013
|
-
}
|
|
21014
|
-
function stdAgentActivityLogTrait(params = {}) {
|
|
21015
|
-
return buildTrait71(resolve92(params));
|
|
21016
|
-
}
|
|
21017
|
-
function stdAgentActivityLogPage(params = {}) {
|
|
21018
|
-
return buildPage72(resolve92(params));
|
|
21019
|
-
}
|
|
21020
|
-
function stdAgentActivityLog(params = {}) {
|
|
21021
|
-
const c = resolve92(params);
|
|
21022
|
-
return makeOrbital(`${c.entityName}Orbital`, buildEntity78(c), [buildTrait71(c)], [buildPage72(c)]);
|
|
21023
|
-
}
|
|
21024
20846
|
|
|
21025
20847
|
// behaviors/functions/molecules/std-agent-planner.ts
|
|
21026
|
-
function
|
|
20848
|
+
function resolve92(params) {
|
|
21027
20849
|
const entityName = params.entityName ?? "Plan";
|
|
21028
20850
|
const p = plural(entityName);
|
|
21029
20851
|
const requiredFields = [
|
|
@@ -21048,7 +20870,8 @@ function resolve93(params) {
|
|
|
21048
20870
|
{ name: "action", type: "string", default: "" },
|
|
21049
20871
|
{ name: "detail", type: "string", default: "" },
|
|
21050
20872
|
{ name: "timestamp", type: "string", default: "" },
|
|
21051
|
-
{ name: "duration", type: "number", default: 0 }
|
|
20873
|
+
{ name: "duration", type: "number", default: 0 },
|
|
20874
|
+
{ name: "icon", type: "string", default: "circle" }
|
|
21052
20875
|
];
|
|
21053
20876
|
const baseFields = ensureIdField(params.fields ?? []);
|
|
21054
20877
|
const userFieldNames = new Set(baseFields.map((f) => f.name));
|
|
@@ -21233,7 +21056,7 @@ function errorView2(_entityName) {
|
|
|
21233
21056
|
]
|
|
21234
21057
|
};
|
|
21235
21058
|
}
|
|
21236
|
-
function
|
|
21059
|
+
function buildTrait71(c) {
|
|
21237
21060
|
const { entityName, categories, memoryLimit } = c;
|
|
21238
21061
|
const categoryList = categories.join(", ");
|
|
21239
21062
|
return {
|
|
@@ -21416,17 +21239,17 @@ function buildTrait72(c) {
|
|
|
21416
21239
|
}
|
|
21417
21240
|
};
|
|
21418
21241
|
}
|
|
21419
|
-
function
|
|
21242
|
+
function buildEntity78(c) {
|
|
21420
21243
|
return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
|
|
21421
21244
|
}
|
|
21422
21245
|
function stdAgentPlannerEntity(params) {
|
|
21423
|
-
return
|
|
21246
|
+
return buildEntity78(resolve92(params));
|
|
21424
21247
|
}
|
|
21425
21248
|
function stdAgentPlannerTrait(params) {
|
|
21426
|
-
return
|
|
21249
|
+
return buildTrait71(resolve92(params));
|
|
21427
21250
|
}
|
|
21428
21251
|
function stdAgentPlannerPage(params) {
|
|
21429
|
-
const c =
|
|
21252
|
+
const c = resolve92(params);
|
|
21430
21253
|
return {
|
|
21431
21254
|
name: c.pageName,
|
|
21432
21255
|
path: c.pagePath,
|
|
@@ -21434,7 +21257,6 @@ function stdAgentPlannerPage(params) {
|
|
|
21434
21257
|
traits: [
|
|
21435
21258
|
{ ref: c.traitName },
|
|
21436
21259
|
{ ref: "PlannerTaskInput" },
|
|
21437
|
-
{ ref: "PlannerActivityLog" },
|
|
21438
21260
|
{ ref: "PlannerClassifierFlow" },
|
|
21439
21261
|
{ ref: "PlannerCompletionFlow" },
|
|
21440
21262
|
{ ref: "PlannerMemoryLifecycle" }
|
|
@@ -21442,9 +21264,9 @@ function stdAgentPlannerPage(params) {
|
|
|
21442
21264
|
};
|
|
21443
21265
|
}
|
|
21444
21266
|
function stdAgentPlanner(params) {
|
|
21445
|
-
const c =
|
|
21267
|
+
const c = resolve92(params);
|
|
21446
21268
|
const { entityName, fields } = c;
|
|
21447
|
-
const plannerTrait =
|
|
21269
|
+
const plannerTrait = buildTrait71(c);
|
|
21448
21270
|
const classifierTrait = extractTrait(stdAgentClassifier({
|
|
21449
21271
|
entityName,
|
|
21450
21272
|
fields,
|
|
@@ -21505,18 +21327,6 @@ function stdAgentPlanner(params) {
|
|
|
21505
21327
|
saveEvent: "PLAN"
|
|
21506
21328
|
}));
|
|
21507
21329
|
modalTrait.name = "PlannerTaskInput";
|
|
21508
|
-
const activityLogTrait = extractTrait(stdAgentActivityLog({
|
|
21509
|
-
entityName,
|
|
21510
|
-
fields,
|
|
21511
|
-
persistence: "runtime"
|
|
21512
|
-
}));
|
|
21513
|
-
activityLogTrait.name = "PlannerActivityLog";
|
|
21514
|
-
activityLogTrait.listens = [];
|
|
21515
|
-
if (activityLogTrait.emits) {
|
|
21516
|
-
for (const e of activityLogTrait.emits) {
|
|
21517
|
-
e.scope = "internal";
|
|
21518
|
-
}
|
|
21519
|
-
}
|
|
21520
21330
|
const entity = makeEntity({ name: entityName, fields, persistence: c.persistence });
|
|
21521
21331
|
const page = {
|
|
21522
21332
|
name: c.pageName,
|
|
@@ -21525,7 +21335,6 @@ function stdAgentPlanner(params) {
|
|
|
21525
21335
|
traits: [
|
|
21526
21336
|
{ ref: plannerTrait.name },
|
|
21527
21337
|
{ ref: modalTrait.name },
|
|
21528
|
-
{ ref: activityLogTrait.name },
|
|
21529
21338
|
{ ref: classifierTrait.name },
|
|
21530
21339
|
{ ref: completionTrait.name },
|
|
21531
21340
|
{ ref: memoryTrait.name }
|
|
@@ -21534,11 +21343,11 @@ function stdAgentPlanner(params) {
|
|
|
21534
21343
|
return makeOrbital(
|
|
21535
21344
|
`${entityName}Orbital`,
|
|
21536
21345
|
entity,
|
|
21537
|
-
[plannerTrait, modalTrait,
|
|
21346
|
+
[plannerTrait, modalTrait, classifierTrait, completionTrait, memoryTrait],
|
|
21538
21347
|
[page]
|
|
21539
21348
|
);
|
|
21540
21349
|
}
|
|
21541
|
-
function
|
|
21350
|
+
function resolve93(params) {
|
|
21542
21351
|
const entityName = params.entityName ?? "ToolCall";
|
|
21543
21352
|
const p = plural(entityName);
|
|
21544
21353
|
const requiredFields = [
|
|
@@ -21569,7 +21378,7 @@ function resolve94(params) {
|
|
|
21569
21378
|
isInitial: params.isInitial ?? false
|
|
21570
21379
|
};
|
|
21571
21380
|
}
|
|
21572
|
-
function
|
|
21381
|
+
function buildEntity79(c) {
|
|
21573
21382
|
return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
|
|
21574
21383
|
}
|
|
21575
21384
|
function buildAgentTrait7(c) {
|
|
@@ -21710,26 +21519,25 @@ function buildAgentTrait7(c) {
|
|
|
21710
21519
|
};
|
|
21711
21520
|
}
|
|
21712
21521
|
function stdAgentToolCallEntity(params = {}) {
|
|
21713
|
-
return
|
|
21522
|
+
return buildEntity79(resolve93(params));
|
|
21714
21523
|
}
|
|
21715
21524
|
function stdAgentToolCallTrait(params = {}) {
|
|
21716
|
-
return buildAgentTrait7(
|
|
21525
|
+
return buildAgentTrait7(resolve93(params));
|
|
21717
21526
|
}
|
|
21718
21527
|
function stdAgentToolCallPage(params = {}) {
|
|
21719
|
-
const c =
|
|
21528
|
+
const c = resolve93(params);
|
|
21720
21529
|
return {
|
|
21721
21530
|
name: c.pageName,
|
|
21722
21531
|
path: c.pagePath,
|
|
21723
21532
|
...c.isInitial ? { isInitial: true } : {},
|
|
21724
21533
|
traits: [
|
|
21725
21534
|
{ ref: `${c.entityName}Modal` },
|
|
21726
|
-
{ ref: `${c.entityName}Log` },
|
|
21727
21535
|
{ ref: `${c.entityName}Agent` }
|
|
21728
21536
|
]
|
|
21729
21537
|
};
|
|
21730
21538
|
}
|
|
21731
21539
|
function stdAgentToolCall(params = {}) {
|
|
21732
|
-
const c =
|
|
21540
|
+
const c = resolve93(params);
|
|
21733
21541
|
const { entityName, fields } = c;
|
|
21734
21542
|
const invokeContent = {
|
|
21735
21543
|
type: "stack",
|
|
@@ -21757,30 +21565,24 @@ function stdAgentToolCall(params = {}) {
|
|
|
21757
21565
|
saveEffects: [["persist", "create", entityName, "@payload.data"]],
|
|
21758
21566
|
emitOnSave: "INVOKED"
|
|
21759
21567
|
}));
|
|
21760
|
-
const activityLogTrait = extractTrait(stdAgentActivityLog({
|
|
21761
|
-
entityName,
|
|
21762
|
-
fields
|
|
21763
|
-
}));
|
|
21764
21568
|
const agentTrait = buildAgentTrait7(c);
|
|
21765
|
-
const entity =
|
|
21569
|
+
const entity = buildEntity79(c);
|
|
21766
21570
|
const page = {
|
|
21767
21571
|
name: c.pageName,
|
|
21768
21572
|
path: c.pagePath,
|
|
21769
21573
|
...c.isInitial ? { isInitial: true } : {},
|
|
21770
21574
|
traits: [
|
|
21771
21575
|
{ ref: modalTrait.name },
|
|
21772
|
-
{ ref: activityLogTrait.name },
|
|
21773
21576
|
{ ref: agentTrait.name }
|
|
21774
21577
|
]
|
|
21775
21578
|
};
|
|
21776
|
-
return makeOrbital(`${c.entityName}Orbital`, entity, [modalTrait,
|
|
21579
|
+
return makeOrbital(`${c.entityName}Orbital`, entity, [modalTrait, agentTrait], [page]);
|
|
21777
21580
|
}
|
|
21778
|
-
function
|
|
21581
|
+
function resolve94(params) {
|
|
21779
21582
|
const entityName = params.entityName ?? "StepTracker";
|
|
21780
21583
|
const p = plural(entityName);
|
|
21781
21584
|
const stepLabels = params.stepLabels ?? ["Initialize", "Process", "Validate", "Complete"];
|
|
21782
21585
|
const requiredFields = [
|
|
21783
|
-
{ name: "steps", type: "string", default: stepLabels.join(",") },
|
|
21784
21586
|
{ name: "currentStep", type: "number", default: 0 },
|
|
21785
21587
|
{ name: "totalSteps", type: "number", default: stepLabels.length },
|
|
21786
21588
|
{ name: "status", type: "string", default: "idle" }
|
|
@@ -21804,11 +21606,12 @@ function resolve95(params) {
|
|
|
21804
21606
|
isInitial: params.isInitial ?? false
|
|
21805
21607
|
};
|
|
21806
21608
|
}
|
|
21807
|
-
function
|
|
21609
|
+
function buildEntity80(c) {
|
|
21808
21610
|
return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
|
|
21809
21611
|
}
|
|
21810
|
-
function
|
|
21612
|
+
function buildTrait72(c) {
|
|
21811
21613
|
const { entityName } = c;
|
|
21614
|
+
const stepsLiteral = c.stepLabels.map((label, i) => ({ id: String(i), title: label }));
|
|
21812
21615
|
const idleUI = {
|
|
21813
21616
|
type: "stack",
|
|
21814
21617
|
direction: "vertical",
|
|
@@ -21826,7 +21629,7 @@ function buildTrait73(c) {
|
|
|
21826
21629
|
]
|
|
21827
21630
|
},
|
|
21828
21631
|
{ type: "divider" },
|
|
21829
|
-
{ type: "wizard-progress", currentStep: "@entity.currentStep",
|
|
21632
|
+
{ type: "wizard-progress", currentStep: "@entity.currentStep", steps: stepsLiteral },
|
|
21830
21633
|
{ type: "button", label: "Start", event: "START", variant: "primary", icon: "play" }
|
|
21831
21634
|
]
|
|
21832
21635
|
};
|
|
@@ -21847,7 +21650,7 @@ function buildTrait73(c) {
|
|
|
21847
21650
|
]
|
|
21848
21651
|
},
|
|
21849
21652
|
{ type: "divider" },
|
|
21850
|
-
{ type: "wizard-progress", currentStep: "@entity.currentStep",
|
|
21653
|
+
{ type: "wizard-progress", currentStep: "@entity.currentStep", steps: stepsLiteral },
|
|
21851
21654
|
{
|
|
21852
21655
|
type: "stack",
|
|
21853
21656
|
direction: "horizontal",
|
|
@@ -21886,7 +21689,7 @@ function buildTrait73(c) {
|
|
|
21886
21689
|
]
|
|
21887
21690
|
},
|
|
21888
21691
|
{ type: "divider" },
|
|
21889
|
-
{ type: "wizard-progress", currentStep: "@entity.totalSteps",
|
|
21692
|
+
{ type: "wizard-progress", currentStep: "@entity.totalSteps", steps: stepsLiteral },
|
|
21890
21693
|
{ type: "alert", variant: "success", message: "All steps completed successfully." },
|
|
21891
21694
|
{ type: "button", label: "Reset", event: "RESET", variant: "ghost", icon: "rotate-ccw" }
|
|
21892
21695
|
]
|
|
@@ -21908,7 +21711,7 @@ function buildTrait73(c) {
|
|
|
21908
21711
|
]
|
|
21909
21712
|
},
|
|
21910
21713
|
{ type: "divider" },
|
|
21911
|
-
{ type: "wizard-progress", currentStep: "@entity.currentStep",
|
|
21714
|
+
{ type: "wizard-progress", currentStep: "@entity.currentStep", steps: stepsLiteral },
|
|
21912
21715
|
{ type: "alert", variant: "error", message: "Pipeline failed at the current step." },
|
|
21913
21716
|
{
|
|
21914
21717
|
type: "stack",
|
|
@@ -22043,25 +21846,25 @@ function buildTrait73(c) {
|
|
|
22043
21846
|
}
|
|
22044
21847
|
};
|
|
22045
21848
|
}
|
|
22046
|
-
function
|
|
21849
|
+
function buildPage72(c) {
|
|
22047
21850
|
return makePage({ name: c.pageName, path: c.pagePath, traitName: c.traitName, isInitial: c.isInitial });
|
|
22048
21851
|
}
|
|
22049
21852
|
function stdAgentStepProgressEntity(params = {}) {
|
|
22050
|
-
return
|
|
21853
|
+
return buildEntity80(resolve94(params));
|
|
22051
21854
|
}
|
|
22052
21855
|
function stdAgentStepProgressTrait(params = {}) {
|
|
22053
|
-
return
|
|
21856
|
+
return buildTrait72(resolve94(params));
|
|
22054
21857
|
}
|
|
22055
21858
|
function stdAgentStepProgressPage(params = {}) {
|
|
22056
|
-
return
|
|
21859
|
+
return buildPage72(resolve94(params));
|
|
22057
21860
|
}
|
|
22058
21861
|
function stdAgentStepProgress(params = {}) {
|
|
22059
|
-
const c =
|
|
22060
|
-
return makeOrbital(`${c.entityName}Orbital`,
|
|
21862
|
+
const c = resolve94(params);
|
|
21863
|
+
return makeOrbital(`${c.entityName}Orbital`, buildEntity80(c), [buildTrait72(c)], [buildPage72(c)]);
|
|
22061
21864
|
}
|
|
22062
21865
|
|
|
22063
21866
|
// behaviors/functions/molecules/std-agent-tool-loop.ts
|
|
22064
|
-
function
|
|
21867
|
+
function resolve95(params) {
|
|
22065
21868
|
const entityName = params.entityName ?? "ToolLoop";
|
|
22066
21869
|
const p = plural(entityName);
|
|
22067
21870
|
const requiredFields = [
|
|
@@ -22259,7 +22062,7 @@ function completedView(_entityName) {
|
|
|
22259
22062
|
{ type: "divider" },
|
|
22260
22063
|
{
|
|
22261
22064
|
type: "simple-grid",
|
|
22262
|
-
|
|
22065
|
+
cols: 2,
|
|
22263
22066
|
children: [
|
|
22264
22067
|
{ type: "stat-display", label: "Iterations", value: `@entity.iterations`, icon: "repeat" },
|
|
22265
22068
|
{ type: "stat-display", label: "Status", value: `@entity.status`, icon: "check" }
|
|
@@ -22296,7 +22099,7 @@ function failedView(_entityName) {
|
|
|
22296
22099
|
{ type: "alert", variant: "error", message: `@entity.error` },
|
|
22297
22100
|
{
|
|
22298
22101
|
type: "simple-grid",
|
|
22299
|
-
|
|
22102
|
+
cols: 2,
|
|
22300
22103
|
children: [
|
|
22301
22104
|
{ type: "stat-display", label: "Iterations Used", value: `@entity.iterations`, icon: "repeat" },
|
|
22302
22105
|
{ type: "stat-display", label: "Max Allowed", value: `@entity.maxIterations`, icon: "shield" }
|
|
@@ -22306,7 +22109,7 @@ function failedView(_entityName) {
|
|
|
22306
22109
|
]
|
|
22307
22110
|
};
|
|
22308
22111
|
}
|
|
22309
|
-
function
|
|
22112
|
+
function buildTrait73(c) {
|
|
22310
22113
|
const { entityName, maxIterations, compactThreshold } = c;
|
|
22311
22114
|
return {
|
|
22312
22115
|
name: c.traitName,
|
|
@@ -22517,17 +22320,17 @@ function buildTrait74(c) {
|
|
|
22517
22320
|
}
|
|
22518
22321
|
};
|
|
22519
22322
|
}
|
|
22520
|
-
function
|
|
22323
|
+
function buildEntity81(c) {
|
|
22521
22324
|
return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
|
|
22522
22325
|
}
|
|
22523
22326
|
function stdAgentToolLoopEntity(params) {
|
|
22524
|
-
return
|
|
22327
|
+
return buildEntity81(resolve95(params));
|
|
22525
22328
|
}
|
|
22526
22329
|
function stdAgentToolLoopTrait(params) {
|
|
22527
|
-
return
|
|
22330
|
+
return buildTrait73(resolve95(params));
|
|
22528
22331
|
}
|
|
22529
22332
|
function stdAgentToolLoopPage(params) {
|
|
22530
|
-
const c =
|
|
22333
|
+
const c = resolve95(params);
|
|
22531
22334
|
return {
|
|
22532
22335
|
name: c.pageName,
|
|
22533
22336
|
path: c.pagePath,
|
|
@@ -22535,7 +22338,6 @@ function stdAgentToolLoopPage(params) {
|
|
|
22535
22338
|
traits: [
|
|
22536
22339
|
{ ref: c.traitName },
|
|
22537
22340
|
{ ref: "ToolLoopStepProgress" },
|
|
22538
|
-
{ ref: "ToolLoopActivityLog" },
|
|
22539
22341
|
{ ref: "ToolLoopCompletionFlow" },
|
|
22540
22342
|
{ ref: "ToolLoopToolCallFlow" },
|
|
22541
22343
|
{ ref: "ToolLoopContextMonitor" }
|
|
@@ -22543,9 +22345,9 @@ function stdAgentToolLoopPage(params) {
|
|
|
22543
22345
|
};
|
|
22544
22346
|
}
|
|
22545
22347
|
function stdAgentToolLoop(params) {
|
|
22546
|
-
const c =
|
|
22348
|
+
const c = resolve95(params);
|
|
22547
22349
|
const { entityName, fields } = c;
|
|
22548
|
-
const loopTrait =
|
|
22350
|
+
const loopTrait = buildTrait73(c);
|
|
22549
22351
|
const completionTrait = extractTrait(stdAgentCompletion({
|
|
22550
22352
|
entityName,
|
|
22551
22353
|
fields,
|
|
@@ -22595,18 +22397,6 @@ function stdAgentToolLoop(params) {
|
|
|
22595
22397
|
e.scope = "internal";
|
|
22596
22398
|
}
|
|
22597
22399
|
}
|
|
22598
|
-
const activityLogTrait = extractTrait(stdAgentActivityLog({
|
|
22599
|
-
entityName,
|
|
22600
|
-
fields,
|
|
22601
|
-
persistence: "runtime"
|
|
22602
|
-
}));
|
|
22603
|
-
activityLogTrait.name = "ToolLoopActivityLog";
|
|
22604
|
-
activityLogTrait.listens = [];
|
|
22605
|
-
if (activityLogTrait.emits) {
|
|
22606
|
-
for (const e of activityLogTrait.emits) {
|
|
22607
|
-
e.scope = "internal";
|
|
22608
|
-
}
|
|
22609
|
-
}
|
|
22610
22400
|
const entity = makeEntity({ name: entityName, fields, persistence: c.persistence });
|
|
22611
22401
|
const page = {
|
|
22612
22402
|
name: c.pageName,
|
|
@@ -22615,7 +22405,6 @@ function stdAgentToolLoop(params) {
|
|
|
22615
22405
|
traits: [
|
|
22616
22406
|
{ ref: loopTrait.name },
|
|
22617
22407
|
{ ref: stepProgressTrait.name },
|
|
22618
|
-
{ ref: activityLogTrait.name },
|
|
22619
22408
|
{ ref: completionTrait.name },
|
|
22620
22409
|
{ ref: toolCallTrait.name },
|
|
22621
22410
|
{ ref: contextTrait.name }
|
|
@@ -22624,11 +22413,11 @@ function stdAgentToolLoop(params) {
|
|
|
22624
22413
|
return makeOrbital(
|
|
22625
22414
|
`${entityName}Orbital`,
|
|
22626
22415
|
entity,
|
|
22627
|
-
[loopTrait, stepProgressTrait,
|
|
22416
|
+
[loopTrait, stepProgressTrait, completionTrait, toolCallTrait, contextTrait],
|
|
22628
22417
|
[page]
|
|
22629
22418
|
);
|
|
22630
22419
|
}
|
|
22631
|
-
function
|
|
22420
|
+
function resolve96(params) {
|
|
22632
22421
|
const entityName = params.entityName ?? "FixLoop";
|
|
22633
22422
|
const p = plural(entityName);
|
|
22634
22423
|
const requiredFields = [
|
|
@@ -22824,7 +22613,7 @@ function succeededView() {
|
|
|
22824
22613
|
{ type: "divider" },
|
|
22825
22614
|
{
|
|
22826
22615
|
type: "simple-grid",
|
|
22827
|
-
|
|
22616
|
+
cols: 2,
|
|
22828
22617
|
children: [
|
|
22829
22618
|
{ type: "stat-display", label: "Fix Attempts", value: `@entity.fixAttempts`, icon: "wrench" },
|
|
22830
22619
|
{ type: "stat-display", label: "Status", value: "Passed", icon: "check" }
|
|
@@ -22857,7 +22646,7 @@ function failedView2() {
|
|
|
22857
22646
|
{ type: "alert", variant: "error", message: `@entity.error` },
|
|
22858
22647
|
{
|
|
22859
22648
|
type: "simple-grid",
|
|
22860
|
-
|
|
22649
|
+
cols: 2,
|
|
22861
22650
|
children: [
|
|
22862
22651
|
{ type: "stat-display", label: "Attempts Used", value: `@entity.fixAttempts`, icon: "wrench" },
|
|
22863
22652
|
{ type: "stat-display", label: "Remaining Errors", value: `@entity.errorCount`, icon: "alert-triangle" }
|
|
@@ -22879,7 +22668,7 @@ function failedView2() {
|
|
|
22879
22668
|
]
|
|
22880
22669
|
};
|
|
22881
22670
|
}
|
|
22882
|
-
function
|
|
22671
|
+
function buildTrait74(c) {
|
|
22883
22672
|
const { entityName, maxAttempts, validateTool, fixTool } = c;
|
|
22884
22673
|
return {
|
|
22885
22674
|
name: c.traitName,
|
|
@@ -23073,17 +22862,17 @@ function buildTrait75(c) {
|
|
|
23073
22862
|
}
|
|
23074
22863
|
};
|
|
23075
22864
|
}
|
|
23076
|
-
function
|
|
22865
|
+
function buildEntity82(c) {
|
|
23077
22866
|
return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
|
|
23078
22867
|
}
|
|
23079
22868
|
function stdAgentFixLoopEntity(params) {
|
|
23080
|
-
return
|
|
22869
|
+
return buildEntity82(resolve96(params));
|
|
23081
22870
|
}
|
|
23082
22871
|
function stdAgentFixLoopTrait(params) {
|
|
23083
|
-
return
|
|
22872
|
+
return buildTrait74(resolve96(params));
|
|
23084
22873
|
}
|
|
23085
22874
|
function stdAgentFixLoopPage(params) {
|
|
23086
|
-
const c =
|
|
22875
|
+
const c = resolve96(params);
|
|
23087
22876
|
return {
|
|
23088
22877
|
name: c.pageName,
|
|
23089
22878
|
path: c.pagePath,
|
|
@@ -23099,9 +22888,9 @@ function stdAgentFixLoopPage(params) {
|
|
|
23099
22888
|
};
|
|
23100
22889
|
}
|
|
23101
22890
|
function stdAgentFixLoop(params) {
|
|
23102
|
-
const c =
|
|
22891
|
+
const c = resolve96(params);
|
|
23103
22892
|
const { entityName, fields } = c;
|
|
23104
|
-
const fixTrait =
|
|
22893
|
+
const fixTrait = buildTrait74(c);
|
|
23105
22894
|
const validateCallTrait = extractTrait(stdAgentToolCall({
|
|
23106
22895
|
entityName,
|
|
23107
22896
|
fields,
|
|
@@ -23184,7 +22973,7 @@ function stdAgentFixLoop(params) {
|
|
|
23184
22973
|
[page]
|
|
23185
22974
|
);
|
|
23186
22975
|
}
|
|
23187
|
-
function
|
|
22976
|
+
function resolve97(params) {
|
|
23188
22977
|
const entityName = params.entityName ?? "Session";
|
|
23189
22978
|
const p = plural(entityName);
|
|
23190
22979
|
const requiredFields = [
|
|
@@ -23211,7 +23000,7 @@ function resolve98(params) {
|
|
|
23211
23000
|
isInitial: params.isInitial ?? false
|
|
23212
23001
|
};
|
|
23213
23002
|
}
|
|
23214
|
-
function
|
|
23003
|
+
function buildEntity83(c) {
|
|
23215
23004
|
return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
|
|
23216
23005
|
}
|
|
23217
23006
|
function buildAgentTrait8(c) {
|
|
@@ -23364,13 +23153,13 @@ function buildAgentTrait8(c) {
|
|
|
23364
23153
|
};
|
|
23365
23154
|
}
|
|
23366
23155
|
function stdAgentSessionEntity(params = {}) {
|
|
23367
|
-
return
|
|
23156
|
+
return buildEntity83(resolve97(params));
|
|
23368
23157
|
}
|
|
23369
23158
|
function stdAgentSessionTrait(params = {}) {
|
|
23370
|
-
return buildAgentTrait8(
|
|
23159
|
+
return buildAgentTrait8(resolve97(params));
|
|
23371
23160
|
}
|
|
23372
23161
|
function stdAgentSessionPage(params = {}) {
|
|
23373
|
-
const c =
|
|
23162
|
+
const c = resolve97(params);
|
|
23374
23163
|
return {
|
|
23375
23164
|
name: c.pageName,
|
|
23376
23165
|
path: c.pagePath,
|
|
@@ -23383,7 +23172,7 @@ function stdAgentSessionPage(params = {}) {
|
|
|
23383
23172
|
};
|
|
23384
23173
|
}
|
|
23385
23174
|
function stdAgentSession(params = {}) {
|
|
23386
|
-
const c =
|
|
23175
|
+
const c = resolve97(params);
|
|
23387
23176
|
const { entityName, fields } = c;
|
|
23388
23177
|
const browseTrait = extractTrait(stdBrowse({
|
|
23389
23178
|
entityName,
|
|
@@ -23442,7 +23231,7 @@ function stdAgentSession(params = {}) {
|
|
|
23442
23231
|
emitOnSave: "LABELED"
|
|
23443
23232
|
}));
|
|
23444
23233
|
const agentTrait = buildAgentTrait8(c);
|
|
23445
|
-
const entity =
|
|
23234
|
+
const entity = buildEntity83(c);
|
|
23446
23235
|
const page = {
|
|
23447
23236
|
name: c.pageName,
|
|
23448
23237
|
path: c.pagePath,
|
|
@@ -23581,7 +23370,7 @@ function stdAgentBuilder(params = {}) {
|
|
|
23581
23370
|
fix: "wrench"
|
|
23582
23371
|
}));
|
|
23583
23372
|
}
|
|
23584
|
-
function
|
|
23373
|
+
function resolve98(params) {
|
|
23585
23374
|
const entityName = params.entityName ?? "SearchResult";
|
|
23586
23375
|
const p = plural(entityName);
|
|
23587
23376
|
const requiredFields = [
|
|
@@ -23607,7 +23396,7 @@ function resolve99(params) {
|
|
|
23607
23396
|
isInitial: params.isInitial ?? false
|
|
23608
23397
|
};
|
|
23609
23398
|
}
|
|
23610
|
-
function
|
|
23399
|
+
function buildEntity84(c) {
|
|
23611
23400
|
return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
|
|
23612
23401
|
}
|
|
23613
23402
|
function buildAgentTrait9(c) {
|
|
@@ -23695,13 +23484,13 @@ function buildAgentTrait9(c) {
|
|
|
23695
23484
|
};
|
|
23696
23485
|
}
|
|
23697
23486
|
function stdAgentSearchEntity(params = {}) {
|
|
23698
|
-
return
|
|
23487
|
+
return buildEntity84(resolve98(params));
|
|
23699
23488
|
}
|
|
23700
23489
|
function stdAgentSearchTrait(params = {}) {
|
|
23701
|
-
return buildAgentTrait9(
|
|
23490
|
+
return buildAgentTrait9(resolve98(params));
|
|
23702
23491
|
}
|
|
23703
23492
|
function stdAgentSearchPage(params = {}) {
|
|
23704
|
-
const c =
|
|
23493
|
+
const c = resolve98(params);
|
|
23705
23494
|
return {
|
|
23706
23495
|
name: c.pageName,
|
|
23707
23496
|
path: c.pagePath,
|
|
@@ -23713,7 +23502,7 @@ function stdAgentSearchPage(params = {}) {
|
|
|
23713
23502
|
};
|
|
23714
23503
|
}
|
|
23715
23504
|
function stdAgentSearch(params = {}) {
|
|
23716
|
-
const c =
|
|
23505
|
+
const c = resolve98(params);
|
|
23717
23506
|
const { entityName, fields } = c;
|
|
23718
23507
|
const browseTrait = extractTrait(stdBrowse({
|
|
23719
23508
|
entityName,
|
|
@@ -23734,7 +23523,7 @@ function stdAgentSearch(params = {}) {
|
|
|
23734
23523
|
refreshEvents: ["SEARCHED"]
|
|
23735
23524
|
}));
|
|
23736
23525
|
const agentTrait = buildAgentTrait9(c);
|
|
23737
|
-
const entity =
|
|
23526
|
+
const entity = buildEntity84(c);
|
|
23738
23527
|
const page = {
|
|
23739
23528
|
name: c.pageName,
|
|
23740
23529
|
path: c.pagePath,
|
|
@@ -23748,7 +23537,7 @@ function stdAgentSearch(params = {}) {
|
|
|
23748
23537
|
}
|
|
23749
23538
|
|
|
23750
23539
|
// behaviors/functions/molecules/std-agent-rag.ts
|
|
23751
|
-
function
|
|
23540
|
+
function resolve99(params) {
|
|
23752
23541
|
const entityName = params.entityName ?? "RagRequest";
|
|
23753
23542
|
const p = plural(entityName);
|
|
23754
23543
|
const requiredFields = [
|
|
@@ -24075,17 +23864,17 @@ function buildRagTrait(c) {
|
|
|
24075
23864
|
}
|
|
24076
23865
|
};
|
|
24077
23866
|
}
|
|
24078
|
-
function
|
|
23867
|
+
function buildEntity85(c) {
|
|
24079
23868
|
return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
|
|
24080
23869
|
}
|
|
24081
23870
|
function stdAgentRagEntity(params) {
|
|
24082
|
-
return
|
|
23871
|
+
return buildEntity85(resolve99(params));
|
|
24083
23872
|
}
|
|
24084
23873
|
function stdAgentRagTrait(params) {
|
|
24085
|
-
return buildRagTrait(
|
|
23874
|
+
return buildRagTrait(resolve99(params));
|
|
24086
23875
|
}
|
|
24087
23876
|
function stdAgentRagPage(params) {
|
|
24088
|
-
const c =
|
|
23877
|
+
const c = resolve99(params);
|
|
24089
23878
|
return {
|
|
24090
23879
|
name: c.pageName,
|
|
24091
23880
|
path: c.pagePath,
|
|
@@ -24100,7 +23889,7 @@ function stdAgentRagPage(params) {
|
|
|
24100
23889
|
};
|
|
24101
23890
|
}
|
|
24102
23891
|
function stdAgentRag(params) {
|
|
24103
|
-
const c =
|
|
23892
|
+
const c = resolve99(params);
|
|
24104
23893
|
const { entityName, fields } = c;
|
|
24105
23894
|
const ragTrait = buildRagTrait(c);
|
|
24106
23895
|
const memoryTrait = extractTrait(stdAgentMemory({
|
|
@@ -25156,6 +24945,185 @@ function stdAgentTutor(params = {}) {
|
|
|
25156
24945
|
concepts: "brain"
|
|
25157
24946
|
}));
|
|
25158
24947
|
}
|
|
24948
|
+
function resolve100(params) {
|
|
24949
|
+
const entityName = params.entityName ?? "ActivityEntry";
|
|
24950
|
+
const p = plural(entityName);
|
|
24951
|
+
const requiredFields = [
|
|
24952
|
+
{ name: "action", type: "string", default: "" },
|
|
24953
|
+
{ name: "detail", type: "string", default: "" },
|
|
24954
|
+
{ name: "status", type: "string", default: "pending" },
|
|
24955
|
+
{ name: "timestamp", type: "string", default: "" },
|
|
24956
|
+
{ name: "duration", type: "number", default: 0 },
|
|
24957
|
+
{ name: "icon", type: "string", default: "circle" }
|
|
24958
|
+
];
|
|
24959
|
+
const baseFields = params.fields ?? [];
|
|
24960
|
+
const existingNames = new Set(baseFields.map((f) => f.name));
|
|
24961
|
+
const mergedFields = [
|
|
24962
|
+
...baseFields,
|
|
24963
|
+
...requiredFields.filter((f) => !existingNames.has(f.name))
|
|
24964
|
+
];
|
|
24965
|
+
const fields = ensureIdField(mergedFields);
|
|
24966
|
+
return {
|
|
24967
|
+
entityName,
|
|
24968
|
+
fields,
|
|
24969
|
+
persistence: params.persistence ?? "persistent",
|
|
24970
|
+
traitName: `${entityName}Log`,
|
|
24971
|
+
pluralName: p,
|
|
24972
|
+
pageName: params.pageName ?? `${entityName}Page`,
|
|
24973
|
+
pagePath: params.pagePath ?? `/${p.toLowerCase()}`,
|
|
24974
|
+
isInitial: params.isInitial ?? false
|
|
24975
|
+
};
|
|
24976
|
+
}
|
|
24977
|
+
function buildEntity86(c) {
|
|
24978
|
+
return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
|
|
24979
|
+
}
|
|
24980
|
+
function buildTrait75(c) {
|
|
24981
|
+
const { entityName } = c;
|
|
24982
|
+
const loggingUI = {
|
|
24983
|
+
type: "stack",
|
|
24984
|
+
direction: "vertical",
|
|
24985
|
+
gap: "lg",
|
|
24986
|
+
children: [
|
|
24987
|
+
{
|
|
24988
|
+
type: "stack",
|
|
24989
|
+
direction: "horizontal",
|
|
24990
|
+
gap: "sm",
|
|
24991
|
+
justify: "space-between",
|
|
24992
|
+
align: "center",
|
|
24993
|
+
children: [
|
|
24994
|
+
{
|
|
24995
|
+
type: "stack",
|
|
24996
|
+
direction: "horizontal",
|
|
24997
|
+
gap: "sm",
|
|
24998
|
+
align: "center",
|
|
24999
|
+
children: [
|
|
25000
|
+
{ type: "icon", name: "activity", size: "lg" },
|
|
25001
|
+
{ type: "typography", content: "Activity Log", variant: "h2" }
|
|
25002
|
+
]
|
|
25003
|
+
},
|
|
25004
|
+
{ type: "button", label: "Clear", event: "CLEAR", variant: "ghost", icon: "trash" }
|
|
25005
|
+
]
|
|
25006
|
+
},
|
|
25007
|
+
{ type: "divider" },
|
|
25008
|
+
{
|
|
25009
|
+
type: "timeline",
|
|
25010
|
+
entity: entityName,
|
|
25011
|
+
emptyIcon: "activity",
|
|
25012
|
+
emptyTitle: "No activity yet",
|
|
25013
|
+
emptyDescription: "Agent actions will appear here as they occur.",
|
|
25014
|
+
renderItem: ["fn", "item", {
|
|
25015
|
+
type: "stack",
|
|
25016
|
+
direction: "vertical",
|
|
25017
|
+
gap: "xs",
|
|
25018
|
+
children: [
|
|
25019
|
+
{
|
|
25020
|
+
type: "stack",
|
|
25021
|
+
direction: "horizontal",
|
|
25022
|
+
gap: "sm",
|
|
25023
|
+
align: "center",
|
|
25024
|
+
children: [
|
|
25025
|
+
{ type: "badge", label: "@item.status" },
|
|
25026
|
+
{ type: "typography", variant: "h4", content: "@item.action" }
|
|
25027
|
+
]
|
|
25028
|
+
},
|
|
25029
|
+
{ type: "typography", variant: "body", color: "muted", content: "@item.detail" },
|
|
25030
|
+
{
|
|
25031
|
+
type: "stack",
|
|
25032
|
+
direction: "horizontal",
|
|
25033
|
+
gap: "sm",
|
|
25034
|
+
align: "center",
|
|
25035
|
+
children: [
|
|
25036
|
+
{ type: "typography", variant: "caption", color: "muted", content: "@item.timestamp" },
|
|
25037
|
+
{ type: "badge", label: "@item.duration", variant: "outline" }
|
|
25038
|
+
]
|
|
25039
|
+
}
|
|
25040
|
+
]
|
|
25041
|
+
}]
|
|
25042
|
+
}
|
|
25043
|
+
]
|
|
25044
|
+
};
|
|
25045
|
+
return {
|
|
25046
|
+
name: c.traitName,
|
|
25047
|
+
linkedEntity: entityName,
|
|
25048
|
+
category: "interaction",
|
|
25049
|
+
emits: [
|
|
25050
|
+
{ event: "LOG_ENTRY", scope: "external", payload: [
|
|
25051
|
+
{ name: "action", type: "string" },
|
|
25052
|
+
{ name: "detail", type: "string" },
|
|
25053
|
+
{ name: "status", type: "string" }
|
|
25054
|
+
] }
|
|
25055
|
+
],
|
|
25056
|
+
listens: [
|
|
25057
|
+
{ event: "LOG_ENTRY", triggers: "LOG_ENTRY", scope: "external" }
|
|
25058
|
+
],
|
|
25059
|
+
stateMachine: {
|
|
25060
|
+
states: [
|
|
25061
|
+
{ name: "logging", isInitial: true }
|
|
25062
|
+
],
|
|
25063
|
+
events: [
|
|
25064
|
+
{ key: "INIT", name: "Initialize" },
|
|
25065
|
+
{ key: "LOG_ENTRY", name: "Log Entry", payload: [
|
|
25066
|
+
{ name: "action", type: "string", required: true },
|
|
25067
|
+
{ name: "detail", type: "string", required: true },
|
|
25068
|
+
{ name: "status", type: "string", required: true }
|
|
25069
|
+
] },
|
|
25070
|
+
{ key: "CLEAR", name: "Clear Log" }
|
|
25071
|
+
],
|
|
25072
|
+
transitions: [
|
|
25073
|
+
{
|
|
25074
|
+
from: "logging",
|
|
25075
|
+
to: "logging",
|
|
25076
|
+
event: "INIT",
|
|
25077
|
+
effects: [
|
|
25078
|
+
["fetch", entityName],
|
|
25079
|
+
["render-ui", "main", loggingUI]
|
|
25080
|
+
]
|
|
25081
|
+
},
|
|
25082
|
+
{
|
|
25083
|
+
from: "logging",
|
|
25084
|
+
to: "logging",
|
|
25085
|
+
event: "LOG_ENTRY",
|
|
25086
|
+
effects: [
|
|
25087
|
+
["persist", "create", entityName, {
|
|
25088
|
+
action: "@payload.action",
|
|
25089
|
+
detail: "@payload.detail",
|
|
25090
|
+
status: "@payload.status",
|
|
25091
|
+
timestamp: "@now"
|
|
25092
|
+
}],
|
|
25093
|
+
["fetch", entityName],
|
|
25094
|
+
["render-ui", "main", loggingUI]
|
|
25095
|
+
]
|
|
25096
|
+
},
|
|
25097
|
+
{
|
|
25098
|
+
from: "logging",
|
|
25099
|
+
to: "logging",
|
|
25100
|
+
event: "CLEAR",
|
|
25101
|
+
effects: [
|
|
25102
|
+
["persist", "delete", entityName],
|
|
25103
|
+
["fetch", entityName],
|
|
25104
|
+
["render-ui", "main", loggingUI]
|
|
25105
|
+
]
|
|
25106
|
+
}
|
|
25107
|
+
]
|
|
25108
|
+
}
|
|
25109
|
+
};
|
|
25110
|
+
}
|
|
25111
|
+
function buildPage73(c) {
|
|
25112
|
+
return makePage({ name: c.pageName, path: c.pagePath, traitName: c.traitName, isInitial: c.isInitial });
|
|
25113
|
+
}
|
|
25114
|
+
function stdAgentActivityLogEntity(params = {}) {
|
|
25115
|
+
return buildEntity86(resolve100(params));
|
|
25116
|
+
}
|
|
25117
|
+
function stdAgentActivityLogTrait(params = {}) {
|
|
25118
|
+
return buildTrait75(resolve100(params));
|
|
25119
|
+
}
|
|
25120
|
+
function stdAgentActivityLogPage(params = {}) {
|
|
25121
|
+
return buildPage73(resolve100(params));
|
|
25122
|
+
}
|
|
25123
|
+
function stdAgentActivityLog(params = {}) {
|
|
25124
|
+
const c = resolve100(params);
|
|
25125
|
+
return makeOrbital(`${c.entityName}Orbital`, buildEntity86(c), [buildTrait75(c)], [buildPage73(c)]);
|
|
25126
|
+
}
|
|
25159
25127
|
function resolve101(params) {
|
|
25160
25128
|
const entityName = params.entityName ?? "LearningRecord";
|
|
25161
25129
|
const p = plural(entityName);
|
|
@@ -25186,7 +25154,8 @@ function resolve101(params) {
|
|
|
25186
25154
|
{ name: "action", type: "string", default: "" },
|
|
25187
25155
|
{ name: "detail", type: "string", default: "" },
|
|
25188
25156
|
{ name: "timestamp", type: "string", default: "" },
|
|
25189
|
-
{ name: "duration", type: "number", default: 0 }
|
|
25157
|
+
{ name: "duration", type: "number", default: 0 },
|
|
25158
|
+
{ name: "icon", type: "string", default: "circle" }
|
|
25190
25159
|
];
|
|
25191
25160
|
const baseFields = ensureIdField(params.fields ?? []);
|
|
25192
25161
|
const userFieldNames = new Set(baseFields.map((f) => f.name));
|
|
@@ -25226,7 +25195,7 @@ function idleView5(_entityName) {
|
|
|
25226
25195
|
{ type: "divider" },
|
|
25227
25196
|
{
|
|
25228
25197
|
type: "simple-grid",
|
|
25229
|
-
|
|
25198
|
+
cols: 3,
|
|
25230
25199
|
children: [
|
|
25231
25200
|
{ type: "stat-display", label: "Successes", value: `@entity.totalSuccesses`, icon: "check-circle" },
|
|
25232
25201
|
{ type: "stat-display", label: "Failures", value: `@entity.totalFailures`, icon: "x-circle" },
|
|
@@ -25500,7 +25469,6 @@ function stdAgentLearnerPage(params) {
|
|
|
25500
25469
|
...c.isInitial ? { isInitial: true } : {},
|
|
25501
25470
|
traits: [
|
|
25502
25471
|
{ ref: c.traitName },
|
|
25503
|
-
{ ref: "LearnerActivityLog" },
|
|
25504
25472
|
{ ref: "LearnerRecordsBrowse" },
|
|
25505
25473
|
{ ref: "LearnerMemoryLifecycle" },
|
|
25506
25474
|
{ ref: "LearnerCompletionFlow" },
|
|
@@ -25548,18 +25516,6 @@ function stdAgentLearner(params) {
|
|
|
25548
25516
|
e.scope = "internal";
|
|
25549
25517
|
}
|
|
25550
25518
|
}
|
|
25551
|
-
const activityLogTrait = extractTrait(stdAgentActivityLog({
|
|
25552
|
-
entityName,
|
|
25553
|
-
fields,
|
|
25554
|
-
persistence: "runtime"
|
|
25555
|
-
}));
|
|
25556
|
-
activityLogTrait.name = "LearnerActivityLog";
|
|
25557
|
-
activityLogTrait.listens = [];
|
|
25558
|
-
if (activityLogTrait.emits) {
|
|
25559
|
-
for (const e of activityLogTrait.emits) {
|
|
25560
|
-
e.scope = "internal";
|
|
25561
|
-
}
|
|
25562
|
-
}
|
|
25563
25519
|
const recordsBrowseTrait = extractTrait(stdBrowse({
|
|
25564
25520
|
entityName,
|
|
25565
25521
|
fields,
|
|
@@ -25579,7 +25535,6 @@ function stdAgentLearner(params) {
|
|
|
25579
25535
|
...c.isInitial ? { isInitial: true } : {},
|
|
25580
25536
|
traits: [
|
|
25581
25537
|
{ ref: learnerTrait.name },
|
|
25582
|
-
{ ref: activityLogTrait.name },
|
|
25583
25538
|
{ ref: recordsBrowseTrait.name },
|
|
25584
25539
|
{ ref: memoryTrait.name },
|
|
25585
25540
|
{ ref: completionTrait.name },
|
|
@@ -25589,7 +25544,7 @@ function stdAgentLearner(params) {
|
|
|
25589
25544
|
return makeOrbital(
|
|
25590
25545
|
`${entityName}Orbital`,
|
|
25591
25546
|
entity,
|
|
25592
|
-
[learnerTrait,
|
|
25547
|
+
[learnerTrait, recordsBrowseTrait, memoryTrait, completionTrait, providerTrait],
|
|
25593
25548
|
[page]
|
|
25594
25549
|
);
|
|
25595
25550
|
}
|