@vellumai/assistant 0.10.7-dev.202607101934.29f4d92 → 0.10.7-dev.202607102035.64f07ea
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/openapi.yaml +0 -264
- package/package.json +1 -1
- package/src/__tests__/conversation-history-web-search.test.ts +0 -4
- package/src/__tests__/helpers/set-config.ts +40 -0
- package/src/__tests__/llm-request-log-disabled-writes.test.ts +11 -23
- package/src/__tests__/plugin-import-boundary-guard.test.ts +0 -1
- package/src/cli/AGENTS.md +3 -2
- package/src/cli/commands/avatar.help.ts +236 -0
- package/src/cli/commands/avatar.ts +66 -250
- package/src/cli/commands/backup.help.ts +190 -0
- package/src/cli/commands/backup.ts +109 -276
- package/src/cli/commands/bash.help.ts +45 -0
- package/src/cli/commands/bash.ts +55 -75
- package/src/cli/commands/browser.help.ts +196 -0
- package/src/cli/commands/browser.ts +222 -343
- package/src/cli/index.help.ts +8 -0
- package/src/cli/lib/cli-command-help.ts +47 -8
- package/src/config/feature-flag-registry.json +0 -8
- package/src/plugins/defaults/memory/__tests__/memory-retrospective-skill-card.test.ts +2 -29
- package/src/plugins/defaults/memory/memory-retrospective-job.ts +8 -19
- package/src/plugins/defaults/memory/memory-retrospective-skill-card.ts +0 -7
- package/src/plugins/defaults/memory/v2/cli-command-content.ts +37 -11
- package/src/runtime/routes/index.ts +0 -2
- package/src/tools/registry.ts +1 -2
- package/src/runtime/routes/work-items-routes.test.ts +0 -68
- package/src/runtime/routes/work-items-routes.ts +0 -914
package/openapi.yaml
CHANGED
|
@@ -30607,270 +30607,6 @@ paths:
|
|
|
30607
30607
|
- path
|
|
30608
30608
|
- mode
|
|
30609
30609
|
additionalProperties: false
|
|
30610
|
-
/v1/work-items:
|
|
30611
|
-
get:
|
|
30612
|
-
operationId: workitems_get
|
|
30613
|
-
summary: List work items
|
|
30614
|
-
description: Return work items, optionally filtered by status.
|
|
30615
|
-
tags:
|
|
30616
|
-
- work-items
|
|
30617
|
-
parameters:
|
|
30618
|
-
- name: status
|
|
30619
|
-
in: query
|
|
30620
|
-
required: false
|
|
30621
|
-
schema:
|
|
30622
|
-
type: string
|
|
30623
|
-
enum:
|
|
30624
|
-
- pending
|
|
30625
|
-
- running
|
|
30626
|
-
- awaiting_review
|
|
30627
|
-
- done
|
|
30628
|
-
- failed
|
|
30629
|
-
- cancelled
|
|
30630
|
-
- archived
|
|
30631
|
-
description: Filter by work item status
|
|
30632
|
-
responses:
|
|
30633
|
-
"200":
|
|
30634
|
-
description: Successful response
|
|
30635
|
-
content:
|
|
30636
|
-
application/json:
|
|
30637
|
-
schema:
|
|
30638
|
-
type: object
|
|
30639
|
-
properties:
|
|
30640
|
-
items:
|
|
30641
|
-
type: array
|
|
30642
|
-
items: {}
|
|
30643
|
-
required:
|
|
30644
|
-
- items
|
|
30645
|
-
additionalProperties: false
|
|
30646
|
-
/v1/work-items/{id}:
|
|
30647
|
-
delete:
|
|
30648
|
-
operationId: workitems_by_id_delete
|
|
30649
|
-
summary: Delete a work item
|
|
30650
|
-
description: Permanently remove a work item.
|
|
30651
|
-
tags:
|
|
30652
|
-
- work-items
|
|
30653
|
-
parameters:
|
|
30654
|
-
- name: id
|
|
30655
|
-
in: path
|
|
30656
|
-
required: true
|
|
30657
|
-
schema:
|
|
30658
|
-
type: string
|
|
30659
|
-
responses:
|
|
30660
|
-
"200":
|
|
30661
|
-
description: Successful response
|
|
30662
|
-
get:
|
|
30663
|
-
operationId: workitems_by_id_get
|
|
30664
|
-
summary: Get a work item
|
|
30665
|
-
description: Return a single work item by ID.
|
|
30666
|
-
tags:
|
|
30667
|
-
- work-items
|
|
30668
|
-
parameters:
|
|
30669
|
-
- name: id
|
|
30670
|
-
in: path
|
|
30671
|
-
required: true
|
|
30672
|
-
schema:
|
|
30673
|
-
type: string
|
|
30674
|
-
responses:
|
|
30675
|
-
"200":
|
|
30676
|
-
description: Successful response
|
|
30677
|
-
patch:
|
|
30678
|
-
operationId: workitems_by_id_patch
|
|
30679
|
-
summary: Update a work item
|
|
30680
|
-
description: Partially update a work item's title, notes, status, or priority.
|
|
30681
|
-
tags:
|
|
30682
|
-
- work-items
|
|
30683
|
-
parameters:
|
|
30684
|
-
- name: id
|
|
30685
|
-
in: path
|
|
30686
|
-
required: true
|
|
30687
|
-
schema:
|
|
30688
|
-
type: string
|
|
30689
|
-
requestBody:
|
|
30690
|
-
required: true
|
|
30691
|
-
content:
|
|
30692
|
-
application/json:
|
|
30693
|
-
schema:
|
|
30694
|
-
type: object
|
|
30695
|
-
properties:
|
|
30696
|
-
title:
|
|
30697
|
-
type: string
|
|
30698
|
-
notes:
|
|
30699
|
-
type: string
|
|
30700
|
-
status:
|
|
30701
|
-
type: string
|
|
30702
|
-
priorityTier:
|
|
30703
|
-
type: integer
|
|
30704
|
-
minimum: -9007199254740991
|
|
30705
|
-
maximum: 9007199254740991
|
|
30706
|
-
sortIndex:
|
|
30707
|
-
type: integer
|
|
30708
|
-
minimum: -9007199254740991
|
|
30709
|
-
maximum: 9007199254740991
|
|
30710
|
-
required:
|
|
30711
|
-
- title
|
|
30712
|
-
- notes
|
|
30713
|
-
- status
|
|
30714
|
-
- priorityTier
|
|
30715
|
-
- sortIndex
|
|
30716
|
-
responses:
|
|
30717
|
-
"200":
|
|
30718
|
-
description: Successful response
|
|
30719
|
-
/v1/work-items/{id}/approve-permissions:
|
|
30720
|
-
post:
|
|
30721
|
-
operationId: workitems_by_id_approvepermissions_post
|
|
30722
|
-
summary: Approve tool permissions
|
|
30723
|
-
description: Pre-approve a set of tools for a work item before it runs.
|
|
30724
|
-
tags:
|
|
30725
|
-
- work-items
|
|
30726
|
-
parameters:
|
|
30727
|
-
- name: id
|
|
30728
|
-
in: path
|
|
30729
|
-
required: true
|
|
30730
|
-
schema:
|
|
30731
|
-
type: string
|
|
30732
|
-
requestBody:
|
|
30733
|
-
required: true
|
|
30734
|
-
content:
|
|
30735
|
-
application/json:
|
|
30736
|
-
schema:
|
|
30737
|
-
type: object
|
|
30738
|
-
properties:
|
|
30739
|
-
approvedTools:
|
|
30740
|
-
type: array
|
|
30741
|
-
items: {}
|
|
30742
|
-
description: Array of tool names to approve
|
|
30743
|
-
required:
|
|
30744
|
-
- approvedTools
|
|
30745
|
-
responses:
|
|
30746
|
-
"200":
|
|
30747
|
-
description: Successful response
|
|
30748
|
-
/v1/work-items/{id}/cancel:
|
|
30749
|
-
post:
|
|
30750
|
-
operationId: workitems_by_id_cancel_post
|
|
30751
|
-
summary: Cancel a running work item
|
|
30752
|
-
description: Abort a running work item and set its status to cancelled.
|
|
30753
|
-
tags:
|
|
30754
|
-
- work-items
|
|
30755
|
-
parameters:
|
|
30756
|
-
- name: id
|
|
30757
|
-
in: path
|
|
30758
|
-
required: true
|
|
30759
|
-
schema:
|
|
30760
|
-
type: string
|
|
30761
|
-
responses:
|
|
30762
|
-
"200":
|
|
30763
|
-
description: Successful response
|
|
30764
|
-
"404":
|
|
30765
|
-
description: Work item not found
|
|
30766
|
-
"409":
|
|
30767
|
-
description: Work item is not running
|
|
30768
|
-
/v1/work-items/{id}/complete:
|
|
30769
|
-
post:
|
|
30770
|
-
operationId: workitems_by_id_complete_post
|
|
30771
|
-
summary: Complete a work item
|
|
30772
|
-
description: Transition a work item from awaiting_review to done.
|
|
30773
|
-
tags:
|
|
30774
|
-
- work-items
|
|
30775
|
-
parameters:
|
|
30776
|
-
- name: id
|
|
30777
|
-
in: path
|
|
30778
|
-
required: true
|
|
30779
|
-
schema:
|
|
30780
|
-
type: string
|
|
30781
|
-
responses:
|
|
30782
|
-
"200":
|
|
30783
|
-
description: Successful response
|
|
30784
|
-
/v1/work-items/{id}/output:
|
|
30785
|
-
get:
|
|
30786
|
-
operationId: workitems_by_id_output_get
|
|
30787
|
-
summary: Get work item output
|
|
30788
|
-
description: Return the final output of a completed work item run.
|
|
30789
|
-
tags:
|
|
30790
|
-
- work-items
|
|
30791
|
-
parameters:
|
|
30792
|
-
- name: id
|
|
30793
|
-
in: path
|
|
30794
|
-
required: true
|
|
30795
|
-
schema:
|
|
30796
|
-
type: string
|
|
30797
|
-
responses:
|
|
30798
|
-
"200":
|
|
30799
|
-
description: Successful response
|
|
30800
|
-
content:
|
|
30801
|
-
application/json:
|
|
30802
|
-
schema:
|
|
30803
|
-
type: object
|
|
30804
|
-
properties:
|
|
30805
|
-
id:
|
|
30806
|
-
type: string
|
|
30807
|
-
success:
|
|
30808
|
-
type: boolean
|
|
30809
|
-
output:
|
|
30810
|
-
type: object
|
|
30811
|
-
properties: {}
|
|
30812
|
-
additionalProperties: {}
|
|
30813
|
-
required:
|
|
30814
|
-
- id
|
|
30815
|
-
- success
|
|
30816
|
-
- output
|
|
30817
|
-
additionalProperties: false
|
|
30818
|
-
/v1/work-items/{id}/preflight:
|
|
30819
|
-
post:
|
|
30820
|
-
operationId: workitems_by_id_preflight_post
|
|
30821
|
-
summary: Preflight check
|
|
30822
|
-
description: Check tool permissions needed before running a work item.
|
|
30823
|
-
tags:
|
|
30824
|
-
- work-items
|
|
30825
|
-
parameters:
|
|
30826
|
-
- name: id
|
|
30827
|
-
in: path
|
|
30828
|
-
required: true
|
|
30829
|
-
schema:
|
|
30830
|
-
type: string
|
|
30831
|
-
responses:
|
|
30832
|
-
"200":
|
|
30833
|
-
description: Successful response
|
|
30834
|
-
content:
|
|
30835
|
-
application/json:
|
|
30836
|
-
schema:
|
|
30837
|
-
type: object
|
|
30838
|
-
properties:
|
|
30839
|
-
id:
|
|
30840
|
-
type: string
|
|
30841
|
-
success:
|
|
30842
|
-
type: boolean
|
|
30843
|
-
permissions:
|
|
30844
|
-
type: object
|
|
30845
|
-
properties: {}
|
|
30846
|
-
additionalProperties: {}
|
|
30847
|
-
required:
|
|
30848
|
-
- id
|
|
30849
|
-
- success
|
|
30850
|
-
- permissions
|
|
30851
|
-
additionalProperties: false
|
|
30852
|
-
/v1/work-items/{id}/run:
|
|
30853
|
-
post:
|
|
30854
|
-
operationId: workitems_by_id_run_post
|
|
30855
|
-
summary: Run a work item
|
|
30856
|
-
description: Execute the task associated with a work item. Returns immediately; execution happens in the background.
|
|
30857
|
-
tags:
|
|
30858
|
-
- work-items
|
|
30859
|
-
parameters:
|
|
30860
|
-
- name: id
|
|
30861
|
-
in: path
|
|
30862
|
-
required: true
|
|
30863
|
-
schema:
|
|
30864
|
-
type: string
|
|
30865
|
-
responses:
|
|
30866
|
-
"200":
|
|
30867
|
-
description: Successful response
|
|
30868
|
-
"403":
|
|
30869
|
-
description: Required tool permissions not approved
|
|
30870
|
-
"404":
|
|
30871
|
-
description: Work item or associated task not found
|
|
30872
|
-
"409":
|
|
30873
|
-
description: Work item is already running or not runnable
|
|
30874
30610
|
/v1/workflows:
|
|
30875
30611
|
get:
|
|
30876
30612
|
operationId: workflows_get
|
package/package.json
CHANGED
|
@@ -703,10 +703,6 @@ describe("web_search_tool_result structural guard", () => {
|
|
|
703
703
|
// web_search_tool_result is not emitted through the subagent event path.
|
|
704
704
|
"runtime/routes/subagents-routes.ts",
|
|
705
705
|
|
|
706
|
-
// Extracts tool results from persisted message content for work-item
|
|
707
|
-
// display. web_search_tool_result blocks are not relevant here.
|
|
708
|
-
"runtime/routes/work-items-routes.ts",
|
|
709
|
-
|
|
710
706
|
// Media token counting iterates tool_result.contentBlocks for nested
|
|
711
707
|
// image/file blocks. web_search_tool_result has opaque content with no
|
|
712
708
|
// contentBlocks property, so it cannot contain nested media.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared test helper: seed workspace config for real instead of mocking
|
|
3
|
+
* `config/loader`.
|
|
4
|
+
*
|
|
5
|
+
* Writes a top-level key into `$VELLUM_WORKSPACE_DIR/config.json`
|
|
6
|
+
* (read-modify-write, so seeding several keys composes) and bumps the file
|
|
7
|
+
* mtime monotonically so the loader's file-signature cache re-reads on the
|
|
8
|
+
* next `getConfig()`/`getConfigReadOnly()`. The production loader
|
|
9
|
+
* schema-merges the partial file over defaults — the same path a user's
|
|
10
|
+
* config.json takes.
|
|
11
|
+
*
|
|
12
|
+
* Node stdlib only, per the test-machinery isolation rules.
|
|
13
|
+
*/
|
|
14
|
+
import { existsSync, readFileSync, utimesSync, writeFileSync } from "node:fs";
|
|
15
|
+
import { join } from "node:path";
|
|
16
|
+
|
|
17
|
+
let mtimeSeq = 0;
|
|
18
|
+
|
|
19
|
+
export function setConfig(key: string, value: unknown): void {
|
|
20
|
+
const path = join(process.env.VELLUM_WORKSPACE_DIR!, "config.json");
|
|
21
|
+
let config: Record<string, unknown> = {};
|
|
22
|
+
if (existsSync(path)) {
|
|
23
|
+
try {
|
|
24
|
+
const parsed = JSON.parse(readFileSync(path, "utf8")) as unknown;
|
|
25
|
+
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
26
|
+
config = parsed as Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
} catch {
|
|
29
|
+
// Unparseable prior seed — start fresh; the loader treats a corrupt
|
|
30
|
+
// file as defaults anyway.
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
config[key] = value;
|
|
34
|
+
writeFileSync(path, JSON.stringify(config));
|
|
35
|
+
// Force a distinct mtime per write so the loader's size+mtime+ctime
|
|
36
|
+
// signature can never read two consecutive seeds as identical.
|
|
37
|
+
mtimeSeq += 1;
|
|
38
|
+
const stamp = new Date(Date.now() + mtimeSeq);
|
|
39
|
+
utimesSync(path, stamp, stamp);
|
|
40
|
+
}
|
|
@@ -5,24 +5,7 @@
|
|
|
5
5
|
* prompt/completion payload lands on disk — and return `null`. The read-side
|
|
6
6
|
* 4xx is exercised separately at the route layer.
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
// Mutable so each test toggles the flag the store reads via `getConfigReadOnly`.
|
|
11
|
-
let enabled = true;
|
|
12
|
-
mock.module("../config/loader.js", () => ({
|
|
13
|
-
getConfig: () => ({
|
|
14
|
-
llmRequestLogs: { readSource: "local", enabled },
|
|
15
|
-
}),
|
|
16
|
-
getConfigReadOnly: () => ({
|
|
17
|
-
llmRequestLogs: { readSource: "local", enabled },
|
|
18
|
-
}),
|
|
19
|
-
}));
|
|
20
|
-
|
|
21
|
-
// `mock.module()` persists process-wide; reset so other files don't inherit a
|
|
22
|
-
// stale value.
|
|
23
|
-
afterAll(() => {
|
|
24
|
-
enabled = true;
|
|
25
|
-
});
|
|
8
|
+
import { beforeEach, describe, expect, test } from "bun:test";
|
|
26
9
|
|
|
27
10
|
import { getLogsDb } from "../persistence/db-connection.js";
|
|
28
11
|
import { initializeDb } from "../persistence/db-init.js";
|
|
@@ -33,6 +16,11 @@ import {
|
|
|
33
16
|
recordSyntheticAgentErrorMessageLog,
|
|
34
17
|
} from "../persistence/llm-request-log-store.js";
|
|
35
18
|
import { llmRequestLogs } from "../persistence/schema/index.js";
|
|
19
|
+
import { setConfig } from "./helpers/set-config.js";
|
|
20
|
+
|
|
21
|
+
function setLlmRequestLogging(enabled: boolean): void {
|
|
22
|
+
setConfig("llmRequestLogs", { readSource: "local", enabled });
|
|
23
|
+
}
|
|
36
24
|
|
|
37
25
|
await initializeDb();
|
|
38
26
|
|
|
@@ -43,7 +31,7 @@ function resetLogs(): void {
|
|
|
43
31
|
describe("llmRequestLogs.enabled write gate", () => {
|
|
44
32
|
beforeEach(() => {
|
|
45
33
|
resetLogs();
|
|
46
|
-
|
|
34
|
+
setLlmRequestLogging(true);
|
|
47
35
|
});
|
|
48
36
|
|
|
49
37
|
test("recordRequestLog writes normally when logging is enabled", () => {
|
|
@@ -53,14 +41,14 @@ describe("llmRequestLogs.enabled write gate", () => {
|
|
|
53
41
|
});
|
|
54
42
|
|
|
55
43
|
test("recordRequestLog skips the write when logging is disabled", () => {
|
|
56
|
-
|
|
44
|
+
setLlmRequestLogging(false);
|
|
57
45
|
const id = recordRequestLog("conv-1", '{"req":1}', '{"res":1}');
|
|
58
46
|
expect(id).toBeNull();
|
|
59
47
|
expect(getRequestLogsByConversationId("conv-1")).toEqual([]);
|
|
60
48
|
});
|
|
61
49
|
|
|
62
50
|
test("recordSyntheticAgentErrorMessageLog skips the write when disabled", () => {
|
|
63
|
-
|
|
51
|
+
setLlmRequestLogging(false);
|
|
64
52
|
const id = recordSyntheticAgentErrorMessageLog({
|
|
65
53
|
conversationId: "conv-2",
|
|
66
54
|
messageId: "msg-2",
|
|
@@ -74,9 +62,9 @@ describe("llmRequestLogs.enabled write gate", () => {
|
|
|
74
62
|
});
|
|
75
63
|
|
|
76
64
|
test("re-enabling logging restores writes", () => {
|
|
77
|
-
|
|
65
|
+
setLlmRequestLogging(false);
|
|
78
66
|
expect(recordRequestLog("conv-3", '{"req":1}', '{"res":1}')).toBeNull();
|
|
79
|
-
|
|
67
|
+
setLlmRequestLogging(true);
|
|
80
68
|
const id = recordRequestLog("conv-3", '{"req":2}', '{"res":2}');
|
|
81
69
|
expect(id).not.toBeNull();
|
|
82
70
|
expect(getRequestLogsByConversationId("conv-3")).toHaveLength(1);
|
|
@@ -137,7 +137,6 @@ const BASELINE: Record<string, readonly string[]> = {
|
|
|
137
137
|
"../../../../telemetry/watchdog-events-store.js",
|
|
138
138
|
"../../../../tools/skills/delete-managed.js",
|
|
139
139
|
"../../../channels/types.js",
|
|
140
|
-
"../../../config/assistant-feature-flags.js",
|
|
141
140
|
"../../../config/loader.js",
|
|
142
141
|
"../../../config/memory-v3-gate.js",
|
|
143
142
|
"../../../config/schema.js",
|
package/src/cli/AGENTS.md
CHANGED
|
@@ -123,9 +123,10 @@ registerFooCommand(program);
|
|
|
123
123
|
_synchronously_ at command registration (so it can't be a lazy
|
|
124
124
|
`import()`) may stay hoisted behind a scoped
|
|
125
125
|
`// eslint-disable-next-line cli/no-daemon-internals` with a comment
|
|
126
|
-
explaining why. The only current case is `browser/operation-meta
|
|
126
|
+
explaining why. The only current case is `browser/operation-meta`, in
|
|
127
127
|
`commands/browser.ts` (it drives synchronous subcommand generation and
|
|
128
|
-
deliberately pulls no Playwright graph).
|
|
128
|
+
deliberately pulls no Playwright graph) and `commands/browser.help.ts`
|
|
129
|
+
(which derives the declarative help from the same contract).
|
|
129
130
|
|
|
130
131
|
2. **Lazy-import daemon functionality inside the action.** Running daemon
|
|
131
132
|
logic in-process is encouraged where it avoids an IPC round-trip (which
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Declarative help for the `assistant avatar` command.
|
|
3
|
+
*
|
|
4
|
+
* Plain data (no action handlers, imports only the help contract type) so the
|
|
5
|
+
* memory capability indexer can read it without pulling in the daemon/IPC action
|
|
6
|
+
* graph. The handlers live in `avatar.ts`, which applies this via
|
|
7
|
+
* `applyCommandHelp` and attaches them.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { CliCommandHelp } from "../lib/cli-command-help.js";
|
|
11
|
+
|
|
12
|
+
export const avatarHelp: CliCommandHelp = {
|
|
13
|
+
name: "avatar",
|
|
14
|
+
description: "Manage the assistant's avatar",
|
|
15
|
+
helpText: `
|
|
16
|
+
The avatar system supports two modes:
|
|
17
|
+
|
|
18
|
+
1. Native character — a procedurally generated character with configurable
|
|
19
|
+
body shape, eye style, and color. The character is rendered as both a
|
|
20
|
+
PNG image and ASCII art. Use the "character" subcommand group to manage
|
|
21
|
+
native character avatars.
|
|
22
|
+
|
|
23
|
+
2. Custom image — an externally provided image file set via the "set"
|
|
24
|
+
subcommand, or generated via "generate".
|
|
25
|
+
|
|
26
|
+
Files are stored in $VELLUM_WORKSPACE_DIR/data/avatar/:
|
|
27
|
+
character-traits.json Current trait selection (bodyShape, eyeStyle, color)
|
|
28
|
+
avatar-image.png Rendered PNG of the character
|
|
29
|
+
character-ascii.txt ASCII art representation (best-effort; may not be written)
|
|
30
|
+
|
|
31
|
+
Examples:
|
|
32
|
+
$ assistant avatar set --image /path/to/photo.png
|
|
33
|
+
$ assistant avatar remove
|
|
34
|
+
$ assistant avatar get --format base64
|
|
35
|
+
$ assistant avatar character update --body-shape blob --eye-style curious --color green
|
|
36
|
+
$ assistant avatar generate --description "a cute blue cat"`,
|
|
37
|
+
subcommands: [
|
|
38
|
+
{
|
|
39
|
+
name: "generate",
|
|
40
|
+
description: "Generate an AI avatar from a text description",
|
|
41
|
+
options: [
|
|
42
|
+
{
|
|
43
|
+
flags: "--description <text>",
|
|
44
|
+
description: "Description of the avatar to generate",
|
|
45
|
+
required: true,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
helpText: `
|
|
49
|
+
Generates an avatar image using AI based on the provided text description
|
|
50
|
+
and saves it as the assistant's avatar PNG. This replaces any existing
|
|
51
|
+
native character avatar — the character traits and ASCII files are removed.
|
|
52
|
+
|
|
53
|
+
On success, writes avatar-image.png to $VELLUM_WORKSPACE_DIR/data/avatar/
|
|
54
|
+
and removes character-traits.json and character-ascii.txt if they exist.
|
|
55
|
+
|
|
56
|
+
Examples:
|
|
57
|
+
$ assistant avatar generate --description "a cute blue cat"
|
|
58
|
+
$ assistant avatar generate --description "a friendly robot with green eyes"`,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "set",
|
|
62
|
+
description:
|
|
63
|
+
"Set the assistant's avatar from an image file (removes any native character)",
|
|
64
|
+
options: [
|
|
65
|
+
{
|
|
66
|
+
flags: "--image <path>",
|
|
67
|
+
description: "Path to image file (absolute or relative to workspace)",
|
|
68
|
+
required: true,
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
helpText: `
|
|
72
|
+
Sets the assistant's avatar by copying the provided image file to the
|
|
73
|
+
canonical avatar location. This REPLACES any existing avatar and removes
|
|
74
|
+
any configured native character: character-traits.json (and character-ascii.txt)
|
|
75
|
+
are deleted, so a previously configured character is NOT preserved and cannot
|
|
76
|
+
be restored. Rebuild the character with "assistant avatar character update"
|
|
77
|
+
to reconfigure one.
|
|
78
|
+
|
|
79
|
+
The --image path can be absolute or relative to the workspace directory.
|
|
80
|
+
|
|
81
|
+
Examples:
|
|
82
|
+
$ assistant avatar set --image /path/to/photo.png
|
|
83
|
+
$ assistant avatar set --image conversations/abc123/attachments/Dropped\\ Image.png`,
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "remove",
|
|
87
|
+
description: "Reset the avatar to none (clears image and character)",
|
|
88
|
+
helpText: `
|
|
89
|
+
Resets the avatar to its empty state. This deletes ALL avatar artifacts —
|
|
90
|
+
the custom image (avatar-image.png) AND any configured native character
|
|
91
|
+
(character-traits.json / character-ascii.txt) — and marks the avatar as
|
|
92
|
+
"none".
|
|
93
|
+
|
|
94
|
+
This is destructive: a previously configured native character is NOT
|
|
95
|
+
preserved and will not be restored. Rebuild the character (or set a new
|
|
96
|
+
image) to configure an avatar again.
|
|
97
|
+
|
|
98
|
+
Examples:
|
|
99
|
+
$ assistant avatar remove`,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "get",
|
|
103
|
+
description: "Retrieve the current avatar",
|
|
104
|
+
options: [
|
|
105
|
+
{
|
|
106
|
+
flags: "--format <format>",
|
|
107
|
+
description: "Output format: path or base64",
|
|
108
|
+
defaultValue: "path",
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
helpText: `
|
|
112
|
+
Retrieves the current avatar. By default prints the absolute file path;
|
|
113
|
+
with --format base64, prints the base64-encoded image content.
|
|
114
|
+
|
|
115
|
+
If no avatar image exists but character-traits.json is present, the PNG
|
|
116
|
+
is regenerated from the saved traits before output.
|
|
117
|
+
|
|
118
|
+
Examples:
|
|
119
|
+
$ assistant avatar get
|
|
120
|
+
$ assistant avatar get --format path
|
|
121
|
+
$ assistant avatar get --format base64`,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "character",
|
|
125
|
+
description: "Manage the native character avatar",
|
|
126
|
+
helpText: `
|
|
127
|
+
A native character avatar is composed of three traits:
|
|
128
|
+
- body shape: the silhouette of the character (e.g. blob, cloud, star)
|
|
129
|
+
- eye style: the expression of the character's eyes (e.g. curious, gentle)
|
|
130
|
+
- color: the body fill color (e.g. green, purple, teal)
|
|
131
|
+
|
|
132
|
+
Use "character components" to list all available values for each trait.
|
|
133
|
+
Use "character update" to set traits and regenerate the avatar files.
|
|
134
|
+
Use "character ascii" to preview the current character in the terminal.
|
|
135
|
+
|
|
136
|
+
Examples:
|
|
137
|
+
$ assistant avatar character update --body-shape blob --eye-style curious --color green
|
|
138
|
+
$ assistant avatar character components --json
|
|
139
|
+
$ assistant avatar character ascii --width 40`,
|
|
140
|
+
subcommands: [
|
|
141
|
+
{
|
|
142
|
+
name: "update",
|
|
143
|
+
description: "Set character traits and regenerate avatar",
|
|
144
|
+
options: [
|
|
145
|
+
{
|
|
146
|
+
flags: "--body-shape <shape>",
|
|
147
|
+
description: "Body shape (e.g. blob, cloud, star)",
|
|
148
|
+
required: true,
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
flags: "--eye-style <style>",
|
|
152
|
+
description: "Eye style (e.g. curious, gentle, goofy)",
|
|
153
|
+
required: true,
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
flags: "--color <color>",
|
|
157
|
+
description: "Body color (e.g. green, purple, teal)",
|
|
158
|
+
required: true,
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
helpText: `
|
|
162
|
+
Sets the three character traits and regenerates avatar files (PNG image,
|
|
163
|
+
traits JSON, and optionally ASCII art). Each trait value must be a valid ID from the
|
|
164
|
+
component set — use "assistant avatar character components" to list valid IDs.
|
|
165
|
+
|
|
166
|
+
The --body-shape flag sets the character silhouette. Valid values:
|
|
167
|
+
blob, cloud, sprout, star, ghost, urchin, stack, flower, burst, ninja
|
|
168
|
+
|
|
169
|
+
The --eye-style flag sets the eye expression. Valid values:
|
|
170
|
+
grumpy, angry, curious, goofy, surprised, bashful, gentle, quirky, dazed
|
|
171
|
+
|
|
172
|
+
The --color flag sets the body fill color. Valid values:
|
|
173
|
+
green, orange, pink, purple, teal, yellow
|
|
174
|
+
|
|
175
|
+
On success, writes character-traits.json and avatar-image.png to
|
|
176
|
+
$VELLUM_WORKSPACE_DIR/data/avatar/. character-ascii.txt is written on a
|
|
177
|
+
best-effort basis and may be skipped if ASCII rendering fails.
|
|
178
|
+
|
|
179
|
+
Examples:
|
|
180
|
+
$ assistant avatar character update --body-shape blob --eye-style curious --color green
|
|
181
|
+
$ assistant avatar character update --body-shape star --eye-style goofy --color purple
|
|
182
|
+
$ assistant avatar character update --body-shape ghost --eye-style gentle --color teal`,
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: "components",
|
|
186
|
+
description: "List available character traits",
|
|
187
|
+
options: [
|
|
188
|
+
{ flags: "--json", description: "Machine-readable JSON output" },
|
|
189
|
+
],
|
|
190
|
+
helpText: `
|
|
191
|
+
Lists all available values for each character trait: body shapes, eye styles,
|
|
192
|
+
and colors. Each value is shown with its ID (the string you pass to
|
|
193
|
+
"character update").
|
|
194
|
+
|
|
195
|
+
With --json, outputs the full components object including SVG path data,
|
|
196
|
+
viewBox dimensions, and face-center coordinates — useful for programmatic
|
|
197
|
+
consumption.
|
|
198
|
+
|
|
199
|
+
Without --json, prints a human-readable summary of IDs only.
|
|
200
|
+
|
|
201
|
+
Examples:
|
|
202
|
+
$ assistant avatar character components
|
|
203
|
+
$ assistant avatar character components --json`,
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: "ascii",
|
|
207
|
+
description: "Print the current character as ASCII art",
|
|
208
|
+
options: [
|
|
209
|
+
{
|
|
210
|
+
flags: "--width <n>",
|
|
211
|
+
description: "Output width in characters",
|
|
212
|
+
defaultValue: "60",
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
helpText: `
|
|
216
|
+
Reads the current character traits from character-traits.json and renders
|
|
217
|
+
the character as ASCII art to stdout. The output uses a brightness ramp
|
|
218
|
+
optimized for dark terminal backgrounds.
|
|
219
|
+
|
|
220
|
+
The --width flag controls the number of characters per line (default: 60).
|
|
221
|
+
Terminal cells are roughly twice as tall as they are wide, so the renderer
|
|
222
|
+
compensates automatically — a 60-character-wide output will look correctly
|
|
223
|
+
proportioned in most terminals.
|
|
224
|
+
|
|
225
|
+
If no character has been set yet, prints an error and suggests using
|
|
226
|
+
"assistant avatar character update" first.
|
|
227
|
+
|
|
228
|
+
Examples:
|
|
229
|
+
$ assistant avatar character ascii
|
|
230
|
+
$ assistant avatar character ascii --width 40
|
|
231
|
+
$ assistant avatar character ascii --width 80`,
|
|
232
|
+
},
|
|
233
|
+
],
|
|
234
|
+
},
|
|
235
|
+
],
|
|
236
|
+
};
|