@vellumai/assistant 0.8.12-staging.1 → 0.8.12

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.
Files changed (35) hide show
  1. package/openapi.yaml +507 -0
  2. package/package.json +1 -1
  3. package/src/__tests__/llm-catalog-parity.test.ts +16 -0
  4. package/src/__tests__/log-export-workspace.test.ts +468 -3
  5. package/src/__tests__/secret-fixtures.ts +20 -0
  6. package/src/__tests__/tool-approval-handler.test.ts +85 -0
  7. package/src/__tests__/tool-audit-listener.test.ts +86 -0
  8. package/src/__tests__/workspace-migration-100-upgrade-quality-profile-to-fable-5.test.ts +174 -0
  9. package/src/__tests__/workspace-migration-101-upgrade-balanced-economy-to-minimax-m3.test.ts +162 -0
  10. package/src/acp/__tests__/agent-process.test.ts +315 -2
  11. package/src/acp/__tests__/prepare-agent-env.test.ts +79 -5
  12. package/src/acp/agent-process.ts +163 -34
  13. package/src/acp/prepare-agent-env.ts +55 -15
  14. package/src/bundler/app-compiler.ts +8 -0
  15. package/src/cli/lib/__tests__/upgrade-plugin.test.ts +10 -4
  16. package/src/cli/lib/upgrade-plugin.ts +13 -7
  17. package/src/config/seed-inference-profiles.ts +4 -8
  18. package/src/events/tool-audit-listener.ts +40 -9
  19. package/src/providers/__tests__/unparseable-tool-args.test.ts +53 -0
  20. package/src/providers/model-catalog.ts +28 -0
  21. package/src/providers/model-intents.ts +1 -1
  22. package/src/providers/openai/chat-completions-provider.ts +2 -1
  23. package/src/providers/openai/responses-provider.ts +2 -1
  24. package/src/providers/unparseable-tool-args.ts +56 -0
  25. package/src/runtime/routes/__tests__/conversation-query-routes.test.ts +132 -0
  26. package/src/runtime/routes/__tests__/plugins-routes.test.ts +347 -0
  27. package/src/runtime/routes/conversation-query-routes.ts +79 -4
  28. package/src/runtime/routes/log-export-routes.ts +143 -96
  29. package/src/runtime/routes/plugins-routes.ts +359 -0
  30. package/src/runtime/routes/redact-staged-export.ts +259 -0
  31. package/src/security/redact-json.ts +61 -0
  32. package/src/tools/tool-approval-handler.ts +31 -0
  33. package/src/workspace/migrations/100-upgrade-quality-profile-to-fable-5.ts +86 -0
  34. package/src/workspace/migrations/101-upgrade-balanced-economy-to-minimax-m3.ts +70 -0
  35. package/src/workspace/migrations/registry.ts +4 -0
package/openapi.yaml CHANGED
@@ -8384,6 +8384,15 @@ paths:
8384
8384
  schema:
8385
8385
  type: string
8386
8386
  description: Internal conversation identifier.
8387
+ - name: view
8388
+ in: query
8389
+ required: false
8390
+ schema:
8391
+ type: string
8392
+ enum:
8393
+ - full
8394
+ - summary
8395
+ description: Response shape. 'summary' omits per-log request/response sections; defaults to 'full'.
8387
8396
  /v1/conversations/rename:
8388
8397
  post:
8389
8398
  operationId: conversations_rename_post
@@ -15282,6 +15291,191 @@ paths:
15282
15291
  responses:
15283
15292
  "200":
15284
15293
  description: Successful response
15294
+ /v1/llm-request-logs/{id}/context:
15295
+ get:
15296
+ operationId: llmrequestlogs_by_id_context_get
15297
+ summary: Get normalized context for a single LLM request log
15298
+ description: Return the normalized summary and request/response sections for a specific log entry.
15299
+ tags:
15300
+ - messages
15301
+ responses:
15302
+ "200":
15303
+ description: Successful response
15304
+ content:
15305
+ application/json:
15306
+ schema:
15307
+ type: object
15308
+ properties:
15309
+ id:
15310
+ type: string
15311
+ createdAt:
15312
+ type: number
15313
+ requestPayload:
15314
+ type: "null"
15315
+ responsePayload:
15316
+ type: "null"
15317
+ provider:
15318
+ anyOf:
15319
+ - type: string
15320
+ - type: "null"
15321
+ summary:
15322
+ anyOf:
15323
+ - type: object
15324
+ properties:
15325
+ provider:
15326
+ anyOf:
15327
+ - type: string
15328
+ - type: "null"
15329
+ model:
15330
+ anyOf:
15331
+ - type: string
15332
+ - type: "null"
15333
+ status:
15334
+ anyOf:
15335
+ - type: string
15336
+ - type: "null"
15337
+ inputTokens:
15338
+ anyOf:
15339
+ - type: number
15340
+ - type: "null"
15341
+ outputTokens:
15342
+ anyOf:
15343
+ - type: number
15344
+ - type: "null"
15345
+ cacheCreationInputTokens:
15346
+ anyOf:
15347
+ - type: number
15348
+ - type: "null"
15349
+ cacheReadInputTokens:
15350
+ anyOf:
15351
+ - type: number
15352
+ - type: "null"
15353
+ stopReason:
15354
+ anyOf:
15355
+ - type: string
15356
+ - type: "null"
15357
+ requestMessageCount:
15358
+ anyOf:
15359
+ - type: number
15360
+ - type: "null"
15361
+ requestToolCount:
15362
+ anyOf:
15363
+ - type: number
15364
+ - type: "null"
15365
+ responseMessageCount:
15366
+ anyOf:
15367
+ - type: number
15368
+ - type: "null"
15369
+ responseToolCallCount:
15370
+ anyOf:
15371
+ - type: number
15372
+ - type: "null"
15373
+ responsePreview:
15374
+ anyOf:
15375
+ - type: string
15376
+ - type: "null"
15377
+ toolCallNames:
15378
+ anyOf:
15379
+ - type: array
15380
+ items:
15381
+ type: string
15382
+ - type: "null"
15383
+ estimatedCostUsd:
15384
+ anyOf:
15385
+ - type: number
15386
+ - type: "null"
15387
+ durationMs:
15388
+ anyOf:
15389
+ - type: number
15390
+ - type: "null"
15391
+ additionalProperties: false
15392
+ - type: "null"
15393
+ requestSections:
15394
+ anyOf:
15395
+ - type: array
15396
+ items:
15397
+ type: object
15398
+ properties:
15399
+ kind:
15400
+ type: string
15401
+ label:
15402
+ anyOf:
15403
+ - type: string
15404
+ - type: "null"
15405
+ role:
15406
+ anyOf:
15407
+ - type: string
15408
+ - type: "null"
15409
+ text:
15410
+ anyOf:
15411
+ - type: string
15412
+ - type: "null"
15413
+ toolName:
15414
+ anyOf:
15415
+ - type: string
15416
+ - type: "null"
15417
+ data: {}
15418
+ language:
15419
+ anyOf:
15420
+ - type: string
15421
+ - type: "null"
15422
+ required:
15423
+ - kind
15424
+ additionalProperties: false
15425
+ - type: "null"
15426
+ responseSections:
15427
+ anyOf:
15428
+ - type: array
15429
+ items:
15430
+ type: object
15431
+ properties:
15432
+ kind:
15433
+ type: string
15434
+ label:
15435
+ anyOf:
15436
+ - type: string
15437
+ - type: "null"
15438
+ role:
15439
+ anyOf:
15440
+ - type: string
15441
+ - type: "null"
15442
+ text:
15443
+ anyOf:
15444
+ - type: string
15445
+ - type: "null"
15446
+ toolName:
15447
+ anyOf:
15448
+ - type: string
15449
+ - type: "null"
15450
+ data: {}
15451
+ language:
15452
+ anyOf:
15453
+ - type: string
15454
+ - type: "null"
15455
+ required:
15456
+ - kind
15457
+ additionalProperties: false
15458
+ - type: "null"
15459
+ agentLoopExitReason:
15460
+ anyOf:
15461
+ - type: string
15462
+ - type: "null"
15463
+ callSite:
15464
+ anyOf:
15465
+ - type: string
15466
+ - type: "null"
15467
+ required:
15468
+ - id
15469
+ - createdAt
15470
+ - requestPayload
15471
+ - responsePayload
15472
+ additionalProperties: false
15473
+ parameters:
15474
+ - name: id
15475
+ in: path
15476
+ required: true
15477
+ schema:
15478
+ type: string
15285
15479
  /v1/llm-request-logs/{id}/payload:
15286
15480
  get:
15287
15481
  operationId: llmrequestlogs_by_id_payload_get
@@ -17594,6 +17788,15 @@ paths:
17594
17788
  required: true
17595
17789
  schema:
17596
17790
  type: string
17791
+ - name: view
17792
+ in: query
17793
+ required: false
17794
+ schema:
17795
+ type: string
17796
+ enum:
17797
+ - full
17798
+ - summary
17799
+ description: Response shape. 'summary' omits per-log request/response sections; defaults to 'full'.
17597
17800
  /v1/messages/{messageId}/tts:
17598
17801
  post:
17599
17802
  operationId: messages_by_messageId_tts_post
@@ -19613,6 +19816,310 @@ paths:
19613
19816
  schema:
19614
19817
  type: string
19615
19818
  description: Optional git ref to read catalog metadata / README at. Defaults to the CLI's `DEFAULT_PLUGIN_REF`.
19819
+ /v1/plugins/{name}/inspect:
19820
+ get:
19821
+ operationId: plugins_by_name_inspect_get
19822
+ summary: Inspect a plugin's install drift
19823
+ description:
19824
+ 'Compare the locally installed copy of a plugin against the marketplace''s current pinned commit and report
19825
+ whether an upgrade is available. Returns a six-way `status` (`up-to-date`, `update-available`, `not-installed`,
19826
+ `not-in-marketplace`, `unknown-provenance`, `remote-unavailable`) plus the local provenance (installed commit,
19827
+ version, source, and any local edits vs the install-time fingerprint) and the remote pin. An unreachable
19828
+ marketplace for an installed plugin is not fatal — it returns 200 with `status: "remote-unavailable"`. A name
19829
+ that is neither installed nor in the catalog returns 404. Powers the web upgrade affordance; mirrors the CLI''s
19830
+ `assistant plugins inspect <name>` and `GET /v1/skills/:id/inspect`.'
19831
+ tags:
19832
+ - plugins
19833
+ responses:
19834
+ "200":
19835
+ description: Successful response
19836
+ content:
19837
+ application/json:
19838
+ schema:
19839
+ type: object
19840
+ properties:
19841
+ name:
19842
+ type: string
19843
+ description: Install name. Matches `assistant plugins install <name>`.
19844
+ installed:
19845
+ type: boolean
19846
+ description: Whether a copy is materialized under `<workspaceDir>/plugins/`.
19847
+ status:
19848
+ type: string
19849
+ enum:
19850
+ - up-to-date
19851
+ - update-available
19852
+ - not-installed
19853
+ - not-in-marketplace
19854
+ - unknown-provenance
19855
+ - remote-unavailable
19856
+ description: Drift classification between the installed copy and the marketplace pin.
19857
+ local:
19858
+ anyOf:
19859
+ - type: object
19860
+ properties:
19861
+ target:
19862
+ type: string
19863
+ description: Absolute path to the installed plugin directory.
19864
+ commit:
19865
+ anyOf:
19866
+ - type: string
19867
+ - type: "null"
19868
+ description: Resolved commit the copy was installed at; null when no provenance was recorded.
19869
+ version:
19870
+ anyOf:
19871
+ - type: string
19872
+ - type: "null"
19873
+ description: Installed `package.json#version`.
19874
+ description:
19875
+ anyOf:
19876
+ - type: string
19877
+ - type: "null"
19878
+ description: Installed `package.json#description`.
19879
+ installedAt:
19880
+ anyOf:
19881
+ - type: string
19882
+ - type: "null"
19883
+ description: ISO-8601 install timestamp from the sidecar; null when absent.
19884
+ source:
19885
+ anyOf:
19886
+ - type: object
19887
+ properties:
19888
+ kind:
19889
+ type: string
19890
+ description: Source kind. Only `github` is written today.
19891
+ owner:
19892
+ type: string
19893
+ repo:
19894
+ type: string
19895
+ path:
19896
+ description: Repo-relative directory holding the plugin root; absent = repo root.
19897
+ type: string
19898
+ ref:
19899
+ type: string
19900
+ description: Ref the install resolved through (the pinned commit SHA for marketplace installs).
19901
+ required:
19902
+ - kind
19903
+ - owner
19904
+ - repo
19905
+ - ref
19906
+ additionalProperties: false
19907
+ description: Source coordinates recorded in the install-time provenance sidecar.
19908
+ - type: "null"
19909
+ description: Source recorded at install time; null when no sidecar exists.
19910
+ localChanges:
19911
+ anyOf:
19912
+ - type: object
19913
+ properties:
19914
+ modified:
19915
+ type: array
19916
+ items:
19917
+ type: string
19918
+ description: Tracked files whose content changed since install.
19919
+ added:
19920
+ type: array
19921
+ items:
19922
+ type: string
19923
+ description: Files present on disk but absent from the install baseline.
19924
+ removed:
19925
+ type: array
19926
+ items:
19927
+ type: string
19928
+ description: Files recorded at install but missing from the on-disk copy.
19929
+ clean:
19930
+ type: boolean
19931
+ description: True when no files were added, removed, or modified.
19932
+ required:
19933
+ - modified
19934
+ - added
19935
+ - removed
19936
+ - clean
19937
+ additionalProperties: false
19938
+ description: Local-edit comparison of the on-disk tree against the install-time fingerprint.
19939
+ - type: "null"
19940
+ description:
19941
+ Local-edit state vs the install-time fingerprint; null when no baseline was recorded (older/manual
19942
+ install).
19943
+ issues:
19944
+ type: array
19945
+ items:
19946
+ type: string
19947
+ description: Non-fatal issues with the installed copy (e.g. malformed `package.json`).
19948
+ required:
19949
+ - target
19950
+ - commit
19951
+ - version
19952
+ - description
19953
+ - installedAt
19954
+ - source
19955
+ - localChanges
19956
+ - issues
19957
+ additionalProperties: false
19958
+ description: The locally installed copy of the plugin.
19959
+ - type: "null"
19960
+ description: Locally installed copy; null when the plugin is not installed.
19961
+ remote:
19962
+ anyOf:
19963
+ - type: object
19964
+ properties:
19965
+ repo:
19966
+ type: string
19967
+ description: "`owner/repo` of the external plugin repository."
19968
+ path:
19969
+ type: string
19970
+ description: Repo-relative directory holding the plugin root; `""` = repo root.
19971
+ commit:
19972
+ type: string
19973
+ description: Pinned commit SHA the marketplace currently resolves installs to.
19974
+ description:
19975
+ anyOf:
19976
+ - type: string
19977
+ - type: "null"
19978
+ homepage:
19979
+ anyOf:
19980
+ - type: string
19981
+ - type: "null"
19982
+ license:
19983
+ anyOf:
19984
+ - type: string
19985
+ - type: "null"
19986
+ category:
19987
+ anyOf:
19988
+ - type: string
19989
+ - type: "null"
19990
+ marketplaceRef:
19991
+ type: string
19992
+ description: Ref of the canonical repo the marketplace manifest was read from.
19993
+ required:
19994
+ - repo
19995
+ - path
19996
+ - commit
19997
+ - description
19998
+ - homepage
19999
+ - license
20000
+ - category
20001
+ - marketplaceRef
20002
+ additionalProperties: false
20003
+ description: The marketplace's current pin and advertised metadata.
20004
+ - type: "null"
20005
+ description: Marketplace pin + metadata; null when no entry claims the name or it was unreachable.
20006
+ remoteError:
20007
+ anyOf:
20008
+ - type: string
20009
+ - type: "null"
20010
+ description: Marketplace fetch error message, when the catalog could not be read.
20011
+ required:
20012
+ - name
20013
+ - installed
20014
+ - status
20015
+ - local
20016
+ - remote
20017
+ - remoteError
20018
+ additionalProperties: false
20019
+ "400":
20020
+ description: The plugin name failed sanitization (e.g. contained slashes, dots, or uppercase letters).
20021
+ "404":
20022
+ description: No installed copy and no catalog entry claims the given name.
20023
+ parameters:
20024
+ - name: name
20025
+ in: path
20026
+ required: true
20027
+ schema:
20028
+ type: string
20029
+ /v1/plugins/{name}/upgrade:
20030
+ post:
20031
+ operationId: plugins_by_name_upgrade_post
20032
+ summary: Upgrade a plugin to the marketplace pin
20033
+ description:
20034
+ 'Move an installed plugin to the marketplace''s current pinned commit, re-materializing it under
20035
+ `<workspaceDir>/plugins/<name>/`. Always resolves against the curated marketplace pin (no caller-supplied ref),
20036
+ mirroring `plugins install`''s curation boundary. A no-op (`outcome: "already-up-to-date"`) when the installed
20037
+ commit already equals the pin; pass `dryRun` to preview the move (`outcome: "would-upgrade"`) without touching
20038
+ the install. Installs lacking provenance are re-pinned to the current SHA. The assistant must be restarted to
20039
+ load the upgraded code. This does not gate on local edits — callers should consult `GET
20040
+ /v1/plugins/:name/inspect` (`local.localChanges`) first and confirm before overwriting. Mirrors the CLI''s
20041
+ `assistant plugins upgrade <name>`.'
20042
+ tags:
20043
+ - plugins
20044
+ responses:
20045
+ "200":
20046
+ description: Successful response
20047
+ content:
20048
+ application/json:
20049
+ schema:
20050
+ type: object
20051
+ properties:
20052
+ name:
20053
+ type: string
20054
+ description: Install name that was (or would be) upgraded.
20055
+ outcome:
20056
+ type: string
20057
+ enum:
20058
+ - upgraded
20059
+ - already-up-to-date
20060
+ - would-upgrade
20061
+ description:
20062
+ "`upgraded` moved the install to the pin; `already-up-to-date` was a no-op; `would-upgrade` is a dry-run
20063
+ that found drift."
20064
+ fromCommit:
20065
+ anyOf:
20066
+ - type: string
20067
+ - type: "null"
20068
+ description: Installed commit before the upgrade; null when no provenance was recorded.
20069
+ toCommit:
20070
+ type: string
20071
+ description: Marketplace-pinned commit the install was (or would be) moved to.
20072
+ target:
20073
+ type: string
20074
+ description: Absolute path to the installed plugin directory on the host.
20075
+ fileCount:
20076
+ anyOf:
20077
+ - type: number
20078
+ - type: "null"
20079
+ description: Files materialized by the upgrade; null for a no-op or dry run.
20080
+ dryRun:
20081
+ type: boolean
20082
+ description: Whether this was a dry run (no changes made).
20083
+ provenanceWasUnknown:
20084
+ type: boolean
20085
+ description:
20086
+ Whether the install lacked resolvable provenance before the upgrade; such installs are re-pinned to record
20087
+ it going forward.
20088
+ required:
20089
+ - name
20090
+ - outcome
20091
+ - fromCommit
20092
+ - toCommit
20093
+ - target
20094
+ - fileCount
20095
+ - dryRun
20096
+ - provenanceWasUnknown
20097
+ additionalProperties: false
20098
+ "400":
20099
+ description: The plugin name failed sanitization (e.g. contained slashes, dots, or uppercase letters).
20100
+ "404":
20101
+ description: No copy of the plugin is installed, or its source resolves to nothing.
20102
+ "409":
20103
+ description: The install exists but has no marketplace entry to advance to.
20104
+ "503":
20105
+ description: The plugin source (GitHub) was temporarily unavailable; the upgrade is retryable.
20106
+ parameters:
20107
+ - name: name
20108
+ in: path
20109
+ required: true
20110
+ schema:
20111
+ type: string
20112
+ requestBody:
20113
+ required: true
20114
+ content:
20115
+ application/json:
20116
+ schema:
20117
+ type: object
20118
+ properties:
20119
+ dryRun:
20120
+ description: Report what would change without modifying the install. Defaults to false.
20121
+ type: boolean
20122
+ additionalProperties: false
19616
20123
  /v1/plugins/install:
19617
20124
  post:
19618
20125
  operationId: plugins_install_post
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/assistant",
3
- "version": "0.8.12-staging.1",
3
+ "version": "0.8.12",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -309,6 +309,22 @@ describe("LLM catalog parity: daemon vs client", () => {
309
309
  });
310
310
  });
311
311
 
312
+ test("MiniMax catalog includes MiniMax M3", () => {
313
+ const minimax = PROVIDER_CATALOG.find((entry) => entry.id === "minimax");
314
+ expect(
315
+ minimax?.models.find((model) => model.id === "MiniMax-M3"),
316
+ ).toMatchObject({
317
+ displayName: "MiniMax M3",
318
+ contextWindowTokens: 1000000,
319
+ defaultContextWindowTokens: 200000,
320
+ maxOutputTokens: 512000,
321
+ longContextMode: "native-model",
322
+ supportsThinking: true,
323
+ supportsVision: true,
324
+ supportsToolUse: true,
325
+ });
326
+ });
327
+
312
328
  // -----------------------------------------------------------------------
313
329
  // pricing.ts ↔ model-catalog.ts parity
314
330
  //