arkaos 3.10.0 → 3.11.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/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.11.0
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// PR85a v3.11.0 — Clone Persona → Agent dialog.
|
|
3
|
+
//
|
|
4
|
+
// Wraps POST /api/personas/{id}/clone in a modal. Operator picks
|
|
5
|
+
// department + tier, confirms, and the new agent is created. Parent
|
|
6
|
+
// navigates to /agents/{new_id} on success.
|
|
7
|
+
|
|
8
|
+
const props = defineProps<{
|
|
9
|
+
modelValue: boolean
|
|
10
|
+
personaId: string
|
|
11
|
+
personaName: string
|
|
12
|
+
}>()
|
|
13
|
+
|
|
14
|
+
const emit = defineEmits<{
|
|
15
|
+
(e: 'update:modelValue', value: boolean): void
|
|
16
|
+
(e: 'cloned', agentId: string): void
|
|
17
|
+
}>()
|
|
18
|
+
|
|
19
|
+
const { apiBase } = useApi()
|
|
20
|
+
const toast = useToast()
|
|
21
|
+
|
|
22
|
+
const department = ref('strategy')
|
|
23
|
+
const tier = ref<1 | 2 | 3>(2)
|
|
24
|
+
const cloning = ref(false)
|
|
25
|
+
|
|
26
|
+
const departmentOptions = [
|
|
27
|
+
'dev', 'marketing', 'brand', 'finance', 'strategy', 'ecom', 'kb', 'ops',
|
|
28
|
+
'pm', 'saas', 'landing', 'content', 'community', 'sales', 'leadership', 'org',
|
|
29
|
+
].map((d) => ({ label: d, value: d }))
|
|
30
|
+
|
|
31
|
+
const tierOptions = [
|
|
32
|
+
{ label: 'Tier 1 — Squad Lead', value: 1 },
|
|
33
|
+
{ label: 'Tier 2 — Specialist', value: 2 },
|
|
34
|
+
{ label: 'Tier 3 — Support', value: 3 },
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
async function clone() {
|
|
38
|
+
cloning.value = true
|
|
39
|
+
try {
|
|
40
|
+
const res = await $fetch<{
|
|
41
|
+
agent_id?: string
|
|
42
|
+
department?: string
|
|
43
|
+
file?: string
|
|
44
|
+
error?: string
|
|
45
|
+
}>(`${apiBase}/api/personas/${props.personaId}/clone`, {
|
|
46
|
+
method: 'POST',
|
|
47
|
+
body: { department: department.value, tier: tier.value },
|
|
48
|
+
})
|
|
49
|
+
if (res.error || !res.agent_id) throw new Error(res.error ?? 'unknown error')
|
|
50
|
+
toast.add({
|
|
51
|
+
title: 'Cloned to agent',
|
|
52
|
+
description: `${props.personaName} → ${res.agent_id} (${res.department})`,
|
|
53
|
+
color: 'success',
|
|
54
|
+
icon: 'i-lucide-copy-plus',
|
|
55
|
+
})
|
|
56
|
+
emit('cloned', res.agent_id)
|
|
57
|
+
emit('update:modelValue', false)
|
|
58
|
+
} catch (err) {
|
|
59
|
+
toast.add({
|
|
60
|
+
title: 'Clone failed',
|
|
61
|
+
description: err instanceof Error ? err.message : 'unknown error',
|
|
62
|
+
color: 'error',
|
|
63
|
+
})
|
|
64
|
+
} finally {
|
|
65
|
+
cloning.value = false
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function close() {
|
|
70
|
+
if (!cloning.value) emit('update:modelValue', false)
|
|
71
|
+
}
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<template>
|
|
75
|
+
<UModal
|
|
76
|
+
:open="modelValue"
|
|
77
|
+
title="Clone to Agent"
|
|
78
|
+
:ui="{ content: 'max-w-md' }"
|
|
79
|
+
@update:open="(v) => v ? null : close()"
|
|
80
|
+
>
|
|
81
|
+
<template #content>
|
|
82
|
+
<UCard>
|
|
83
|
+
<template #header>
|
|
84
|
+
<div class="flex items-center justify-between gap-3">
|
|
85
|
+
<div>
|
|
86
|
+
<h2 class="text-lg font-bold">Clone to Agent</h2>
|
|
87
|
+
<p class="text-sm text-muted mt-0.5">
|
|
88
|
+
Create a new agent based on <strong>{{ personaName }}</strong>.
|
|
89
|
+
</p>
|
|
90
|
+
</div>
|
|
91
|
+
<UButton
|
|
92
|
+
icon="i-lucide-x"
|
|
93
|
+
variant="ghost"
|
|
94
|
+
size="sm"
|
|
95
|
+
aria-label="Close"
|
|
96
|
+
:disabled="cloning"
|
|
97
|
+
@click="close"
|
|
98
|
+
/>
|
|
99
|
+
</div>
|
|
100
|
+
</template>
|
|
101
|
+
|
|
102
|
+
<div class="space-y-4">
|
|
103
|
+
<UFormField label="Department" required>
|
|
104
|
+
<USelect v-model="department" :items="departmentOptions" class="w-full" />
|
|
105
|
+
</UFormField>
|
|
106
|
+
<UFormField label="Tier" required>
|
|
107
|
+
<USelect v-model="tier" :items="tierOptions" class="w-full" />
|
|
108
|
+
</UFormField>
|
|
109
|
+
<p class="rounded-lg border border-primary/30 bg-primary/5 p-3 text-xs text-muted">
|
|
110
|
+
<UIcon name="i-lucide-info" class="size-3.5 inline" />
|
|
111
|
+
The agent inherits the persona's behavioural DNA (DISC, Enneagram,
|
|
112
|
+
MBTI, Big Five), mental models, expertise, and frameworks. You can
|
|
113
|
+
edit it freely after creation.
|
|
114
|
+
</p>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
<template #footer>
|
|
118
|
+
<div class="flex items-center justify-end gap-2">
|
|
119
|
+
<UButton label="Cancel" variant="ghost" :disabled="cloning" @click="close" />
|
|
120
|
+
<UButton
|
|
121
|
+
label="Clone"
|
|
122
|
+
icon="i-lucide-copy-plus"
|
|
123
|
+
color="primary"
|
|
124
|
+
:loading="cloning"
|
|
125
|
+
@click="clone"
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
128
|
+
</template>
|
|
129
|
+
</UCard>
|
|
130
|
+
</template>
|
|
131
|
+
</UModal>
|
|
132
|
+
</template>
|
|
@@ -226,6 +226,12 @@ function csvToList(value: string): string[] {
|
|
|
226
226
|
type SuggestField = 'mental_models' | 'frameworks' | 'expertise_domains' | 'communication_avoid' | 'key_quotes'
|
|
227
227
|
const suggestingField = ref<SuggestField | null>(null)
|
|
228
228
|
|
|
229
|
+
// PR85a v3.11.0 — Clone to Agent dialog.
|
|
230
|
+
const cloneOpen = ref(false)
|
|
231
|
+
function onCloned(agentId: string) {
|
|
232
|
+
navigateTo(`/agents/${agentId}`)
|
|
233
|
+
}
|
|
234
|
+
|
|
229
235
|
// PR84c v3.9.0 — Auto-fill empty lists in one go.
|
|
230
236
|
const autofilling = ref(false)
|
|
231
237
|
|
|
@@ -467,6 +473,13 @@ const vocabOptions = [
|
|
|
467
473
|
</p>
|
|
468
474
|
</div>
|
|
469
475
|
<div class="flex items-center gap-2">
|
|
476
|
+
<UButton
|
|
477
|
+
label="Clone to Agent"
|
|
478
|
+
icon="i-lucide-copy-plus"
|
|
479
|
+
variant="soft"
|
|
480
|
+
size="sm"
|
|
481
|
+
@click="cloneOpen = true"
|
|
482
|
+
/>
|
|
470
483
|
<UButton label="Edit" icon="i-lucide-pencil" size="sm" @click="startEdit" />
|
|
471
484
|
<UButton
|
|
472
485
|
icon="i-lucide-trash-2"
|
|
@@ -962,6 +975,14 @@ const vocabOptions = [
|
|
|
962
975
|
</UCard>
|
|
963
976
|
</template>
|
|
964
977
|
</USlideover>
|
|
978
|
+
|
|
979
|
+
<PersonaCloneDialog
|
|
980
|
+
v-if="detail"
|
|
981
|
+
v-model="cloneOpen"
|
|
982
|
+
:persona-id="detail.id"
|
|
983
|
+
:persona-name="detail.name"
|
|
984
|
+
@cloned="onCloned"
|
|
985
|
+
/>
|
|
965
986
|
</div>
|
|
966
987
|
</DashboardState>
|
|
967
988
|
</template>
|
package/package.json
CHANGED