@arnilo/prism 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +8 -2
- package/dist/agents.js +21 -2
- package/dist/artifacts.d.ts +78 -0
- package/dist/artifacts.js +24 -0
- package/dist/contracts.d.ts +35 -1
- package/dist/contracts.js +8 -0
- package/dist/conversations.d.ts +50 -0
- package/dist/conversations.js +97 -0
- package/dist/credentials.d.ts +14 -0
- package/dist/credentials.js +9 -0
- package/dist/devices.d.ts +94 -0
- package/dist/devices.js +138 -0
- package/dist/extensions.d.ts +11 -0
- package/dist/extensions.js +15 -0
- package/dist/identity.d.ts +92 -0
- package/dist/identity.js +257 -0
- package/dist/index.d.ts +15 -5
- package/dist/index.js +8 -3
- package/dist/persistence-lifecycle.d.ts +103 -0
- package/dist/persistence-lifecycle.js +204 -0
- package/dist/providers/openai-compatible.d.ts +5 -1
- package/dist/providers/openai-compatible.js +15 -6
- package/dist/providers/openai-primitives.js +5 -2
- package/dist/secure-agent.js +7 -1
- package/dist/testing/persistence-schema.d.ts +2 -2
- package/dist/testing/persistence-schema.js +35 -2
- package/dist/tools.d.ts +2 -0
- package/dist/tools.js +6 -0
- package/docs/a2a.md +2 -0
- package/docs/ag-ui.md +5 -0
- package/docs/agent-identity.md +111 -0
- package/docs/browser-automation.md +3 -0
- package/docs/conversations.md +135 -0
- package/docs/credential-storage.md +31 -1
- package/docs/credentials-and-redaction.md +2 -0
- package/docs/database-persistence.md +22 -7
- package/docs/device-adapters.md +97 -0
- package/docs/extensions.md +1 -0
- package/docs/guardrails.md +3 -0
- package/docs/host-security.md +9 -3
- package/docs/index.md +26 -13
- package/docs/mcp-tools.md +2 -0
- package/docs/migration.md +48 -0
- package/docs/model-routing.md +102 -0
- package/docs/observability.md +2 -0
- package/docs/performance.md +21 -0
- package/docs/policy-and-audit.md +128 -0
- package/docs/postgres-persistence.md +1 -1
- package/docs/provider-caching.md +4 -0
- package/docs/provider-packages.md +12 -2
- package/docs/provider-request-policies.md +2 -0
- package/docs/providers/alibaba.md +179 -0
- package/docs/providers/azure.md +74 -0
- package/docs/providers/bedrock.md +72 -0
- package/docs/providers/google.md +1 -0
- package/docs/providers/ollama.md +166 -0
- package/docs/providers/openai-compatible.md +3 -1
- package/docs/providers/openrouter.md +2 -0
- package/docs/providers/vertex.md +71 -0
- package/docs/public-contracts.md +3 -1
- package/docs/release-and-install.md +149 -7
- package/docs/review-coverage-2026-07-23-phase-8.md +245 -0
- package/docs/review-coverage-2026-07-25-phase-9.md +256 -0
- package/docs/runs-and-usage.md +2 -0
- package/docs/server.md +37 -4
- package/docs/sqlite-persistence.md +1 -1
- package/docs/supervisors.md +2 -0
- package/docs/work-artifacts-and-review.md +100 -0
- package/docs/work-connectors.md +32 -0
- package/docs/work-tools.md +117 -0
- package/docs/workflows.md +4 -0
- package/docs/working-and-semantic-memory.md +20 -5
- package/package.json +4 -1
- package/templates/init/providers.json +22 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Work tools
|
|
2
|
+
|
|
3
|
+
Optional `@arnilo/prism-work-tools` package: identity-scoped Microsoft 365 and Google Workspace connectors. Host-pinned CLI binaries only; hard-coded `execFile` argv templates; draft-then-approve mutations; side-effect idempotency; shared mail/calendar/file/task result shapes.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
Use when agents must read or mutate tenant mail/calendar/files/tasks through the enterprise CLI the host already operates — not through model-built shell strings or generic Graph/Discovery free-form calls.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @arnilo/prism-work-tools
|
|
13
|
+
# host separately:
|
|
14
|
+
# npm i -g @pnp/cli-microsoft365
|
|
15
|
+
# npm i -g @googleworkspace/cli
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## API
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import {
|
|
22
|
+
createWorkTools,
|
|
23
|
+
createMicrosoft365CliAdapter,
|
|
24
|
+
createGoogleWorkspaceCliAdapter,
|
|
25
|
+
createMemoryIdempotencyStore,
|
|
26
|
+
} from "@arnilo/prism-work-tools";
|
|
27
|
+
// or: import { createGoogleWorkspaceCliAdapter } from "@arnilo/prism-work-tools/google-workspace";
|
|
28
|
+
|
|
29
|
+
const microsoft365 = createMicrosoft365CliAdapter({
|
|
30
|
+
binary: process.env.M365_BIN!,
|
|
31
|
+
configDir: `/var/prism/m365/${tenant}/${user}`,
|
|
32
|
+
identity,
|
|
33
|
+
// Optional late-bound per-identity token (0.0.14): env var only, never argv/model context.
|
|
34
|
+
// tokenProvider: createOAuthWorkTokenProvider({ provider: m365OAuth, store, envVar: "M365_ACCESSTOKEN" }),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const googleWorkspace = createGoogleWorkspaceCliAdapter({
|
|
38
|
+
binary: process.env.GWS_BIN!,
|
|
39
|
+
configDir: `/var/prism/gws/${tenant}/${user}`,
|
|
40
|
+
identity,
|
|
41
|
+
// allowedOps: add docs.create / sheets.create / slides.create when gated
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const tools = createWorkTools({
|
|
45
|
+
microsoft365,
|
|
46
|
+
googleWorkspace,
|
|
47
|
+
idempotencyStore: createMemoryIdempotencyStore(),
|
|
48
|
+
approval: { isApproved: ({ draftId }) => hostHasApproved(draftId) },
|
|
49
|
+
externalRecipients: { allow: (addr) => addr.endsWith("@contoso.com") },
|
|
50
|
+
});
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
List/get tools return shared `WorkPage` / `WorkMailMessage` / `WorkCalendarEvent` / `WorkFileItem` / `WorkTaskItem` shapes (`untrusted: true`) via package normalizers — provider-specific fields are not hidden; they are mapped onto the common denominator.
|
|
54
|
+
|
|
55
|
+
### Hard-coded Microsoft 365 ops
|
|
56
|
+
|
|
57
|
+
Verified against [CLI for Microsoft 365](https://pnp.github.io/cli-microsoft365/) (2026-07-23):
|
|
58
|
+
|
|
59
|
+
| Prism op | CLI |
|
|
60
|
+
| --- | --- |
|
|
61
|
+
| `mail.list` | `m365 outlook message list --output json` |
|
|
62
|
+
| `mail.get` | `m365 outlook message get --output json --id …` |
|
|
63
|
+
| `mail.send` | `m365 outlook mail send --output json --to … --subject … --bodyContents …` |
|
|
64
|
+
| `calendar.list` | `m365 outlook event list --output json` |
|
|
65
|
+
| `calendar.add` | `m365 outlook event add --output json --subject … --start … --end …` |
|
|
66
|
+
| `file.list` | `m365 file list --output json --webUrl … --folderUrl …` |
|
|
67
|
+
| `file.add` | `m365 file add --output json --folderUrl … --filePath …` |
|
|
68
|
+
| `file.share` | `m365 spo file sharinglink add` (`--scope organization` only) |
|
|
69
|
+
| `todo.*` / `planner.*` | capability-gated via `allowedOps` |
|
|
70
|
+
|
|
71
|
+
### Hard-coded Google Workspace ops
|
|
72
|
+
|
|
73
|
+
Verified against [`@googleworkspace/cli` / `gws`](https://github.com/googleworkspace/cli) (2026-07-24):
|
|
74
|
+
|
|
75
|
+
| Prism op | CLI |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| `mail.list` | `gws gmail users messages list --params … --fields …` |
|
|
78
|
+
| `mail.get` | `gws gmail users messages get --params …` |
|
|
79
|
+
| `mail.send` | `gws gmail +send --to … --subject … --body …` |
|
|
80
|
+
| `calendar.list` | `gws calendar events list --params … --fields …` |
|
|
81
|
+
| `calendar.add` | `gws calendar events insert --params … --json …` |
|
|
82
|
+
| `file.list` | `gws drive files list --params … [--page-all]` (NDJSON when paginated) |
|
|
83
|
+
| `file.add` | `gws drive files create --json … --upload …` |
|
|
84
|
+
| `file.share` | `gws drive permissions create` (`type=domain\|user` only; `anyone` denied) |
|
|
85
|
+
| `task.*` | `gws tasks tasks list\|insert\|patch` |
|
|
86
|
+
| `docs.create` / `sheets.create` / `slides.create` | capability-gated via `allowedOps` |
|
|
87
|
+
|
|
88
|
+
Startup: M365 `version --output json`; GWS `--version`. Forbidden: `login`, `setup`, `auth`, `schema`, `doctor`, `--debug`, `--verbose`, credentials in argv, anonymous share, model-supplied command strings / free-form Discovery.
|
|
89
|
+
|
|
90
|
+
### Draft → approve → execute
|
|
91
|
+
|
|
92
|
+
Mutation tools (`*_mail_draft_send`, `*_draft_*`) create an in-adapter draft and return `{ status: "pending_approval", draftId }` until `approval.isApproved` is true. Retries with the same `idempotencyKey` return `{ status: "duplicate" }` after first successful execute.
|
|
93
|
+
|
|
94
|
+
## Limits
|
|
95
|
+
|
|
96
|
+
| Resource | Default / hard |
|
|
97
|
+
| --- | ---: |
|
|
98
|
+
| Pagination pages | 20 / 100 |
|
|
99
|
+
| Items / aggregate | 50/500 ; 200/2000 |
|
|
100
|
+
| Body / stdout | 256 KiB–2 MiB / 2–16 MiB |
|
|
101
|
+
| Process wall time | 60 s / 10 min |
|
|
102
|
+
| Concurrent CLI / identity | 2 / 8 |
|
|
103
|
+
|
|
104
|
+
## Security
|
|
105
|
+
|
|
106
|
+
- Require host-verified `AgentIdentity`; no cross-identity configDir reuse.
|
|
107
|
+
- Connector tokens (0.0.14): an optional `tokenProvider` resolves a per-identity access token into an env var per call — never argv, never model context. A missing/expired/revoked/cross-identity/wrong-tenant token fails the call closed before any exec. Refresh is late-bound and single-flighted per account (no refresh storm under reconnect). Build one with `createOAuthWorkTokenProvider()` from `@arnilo/prism-credentials-node`.
|
|
108
|
+
- External mail recipients fail closed unless `externalRecipients.allow` returns true.
|
|
109
|
+
- Anonymous / `anyone` sharing denied.
|
|
110
|
+
- CLI stdout/stderr capped; NDJSON page streams strictly parsed and page-capped; process killed on timeout/abort/overflow.
|
|
111
|
+
|
|
112
|
+
## Related
|
|
113
|
+
|
|
114
|
+
- [Work connectors](work-connectors.md)
|
|
115
|
+
- [Agent identity](agent-identity.md)
|
|
116
|
+
- [Host security](host-security.md)
|
|
117
|
+
- [Credential storage](credential-storage.md)
|
package/docs/workflows.md
CHANGED
|
@@ -18,6 +18,7 @@ Primary exports:
|
|
|
18
18
|
| `createWorkflowCommands` | Optional `CommandDefinition[]` for direct/background/replay/status/list/cancel/resume and, when selected, schedule control |
|
|
19
19
|
| `enqueueWorkflow` / `startWorkflowBackground` / `createWorkflowCoordinator` | Persist queued work and atomically claim/renew/execute it across processes using `LeaseStore` |
|
|
20
20
|
| `createWorkflowSchedules` | Explicit ownership-scoped one-time/interval/host-calculated schedules over existing checkpoint/lease stores |
|
|
21
|
+
| `createProactiveScheduleCapabilities` | Scoped, expiring, revocable capability tokens that enable proactive schedules; revocation stops firing fail-closed |
|
|
21
22
|
|
|
22
23
|
Included through `@arnilo/prism-sdk` and `@arnilo/prism-all`; installing either profile does not start workflows. Interactive TUI is out of scope (C-012 deferred).
|
|
23
24
|
|
|
@@ -82,6 +83,8 @@ Every node receives bounded `ctx.state`, `ctx.stateVersion`, and async `ctx.upda
|
|
|
82
83
|
|
|
83
84
|
`createWorkflowSchedules({ store, leases, checkpoints, workflows, ownership, ownerId, calculators? })` is inert until its host calls `pollOnce()` or `run({ signal })`. Ownership requires `tenantId` plus `accountId` or `userId`. Methods are `create`, `get`, `list`, `pause`, `resume`, `trigger`, `delete`, `pollOnce`, and `run`. A record has one required `nextRunAt`, optional fixed `intervalMs` or registered `calculatorId` (never both), bounded input/metadata, status, version, and last-fire attribution. Manual trigger requires an idempotency key. Scheduled run IDs derive from schedule ID plus fire timestamp, so retry after enqueue-before-advance finds the same queued checkpoint instead of duplicating it. Defaults: page 100/hard 500, due claims 16/hard 256, input 256 KiB/hard 1 MiB, poll 1s, fire lease 30s.
|
|
84
85
|
|
|
86
|
+
`createProactiveScheduleCapabilities({ schedules, store, ownership, ownerId, defaultTtlMs?, maxTtlMs?, onCapability? })` wraps a `WorkflowSchedules` facade in explicit user enablement. `enable({ workflowId, scope, actor, nextRunAt, intervalMs?|calculatorId?, input?, ttlMs? })` creates the schedule plus a scoped, expiring `ScheduleCapabilityToken` (default TTL 24h / hard 31d, record ≤ 16 KiB) stamped with redacted actor refs. `revoke(tokenId, actor)` marks the token revoked and pauses the underlying schedule so `pollOnce()` never fires it (fail-closed). `assertActive(tokenId)` is a fail-closed guard for manual trigger paths — it throws on missing/revoked/expired tokens. `onCapability` emits `capability_enabled` / `capability_revoked` / `capability_denied` events (redacted refs only) that hosts bridge to `@arnilo/prism-policy` for an auditable ledger. Tokens are ownership-scoped checkpoint records; no cron expression or secret is persisted.
|
|
87
|
+
|
|
85
88
|
## Outputs / response / events
|
|
86
89
|
|
|
87
90
|
`runWorkflow` / `resumeWorkflow` resolve to `WorkflowRunResult`:
|
|
@@ -280,6 +283,7 @@ runRpcServer({
|
|
|
280
283
|
- Nested workflows inherit host registries/policies and cannot inject broader tools, agents, ownership, or credentials. Nested depth is inherited; child suspension bubbles to the parent review cursor.
|
|
281
284
|
- Replay source ownership/hash/status/node eligibility are checked before a new checkpoint is created. Source records are immutable, lineage is bounded, and copied approval-bearing paths are rejected.
|
|
282
285
|
- Schedule services are ownership-scoped and explicitly started. Per-fire leases plus deterministic run IDs/CAS prevent duplicate enqueue across coordinators and crash retry. Host calculator IDs resolve only from the supplied map; no callback or cron expression is persisted.
|
|
286
|
+
- Proactive schedules require an explicit capability grant. Revocation pauses the schedule (never fired by `pollOnce`) and `assertActive` fails closed on missing/revoked/expired tokens; enable/revoke/deny events carry redacted actor refs for the host policy ledger. Capability TTL is capped (default 24h / hard 31d) and the token record is byte-bounded (≤ 16 KiB); tokens are ownership-scoped, so foreign access fails closed rather than leaking existence.
|
|
283
287
|
- Scheduler stores O(nodes + active outputs + bounded state history); ready-node work uses indegree maps, not repeated full scans.
|
|
284
288
|
- Lease acquisition is atomic; opaque tokens protect renew/release; monotonically increasing fencing tokens plus checkpoint compare-and-swap prevent expired workers from committing after takeover. Node functions must honor `ctx.signal` for prompt cooperative cancellation.
|
|
285
289
|
|
|
@@ -25,17 +25,27 @@ Ordinary Prism sessions do not require this package or any vector backend.
|
|
|
25
25
|
| `workingMemoryTemplate` | no | `{{path}}` template for context injection |
|
|
26
26
|
| `limits` | no | top-K, adjacent range, batch, payload, injected-token caps |
|
|
27
27
|
| `redactor` / `secrets` | no | Redact text/metadata before persist/inject |
|
|
28
|
+
| `requireConsent` | no | Strict mode: recall/injection excludes entries lacking explicit consent |
|
|
28
29
|
|
|
29
|
-
Semantic indexing:
|
|
30
|
+
Semantic indexing (entries carry consent/source/visibility; unset defaults to `{ source: "user", scope: "thread", visible: true }`):
|
|
30
31
|
|
|
31
32
|
```ts
|
|
32
|
-
await memory.remember({ entries: [{ id, text, metadata?, sequence? }] }, { wait?: boolean })
|
|
33
|
+
await memory.remember({ entries: [{ id, text, metadata?, consent?, sequence? }] }, { wait?: boolean })
|
|
33
34
|
```
|
|
34
35
|
|
|
35
|
-
Semantic recall:
|
|
36
|
+
Semantic recall (honors consent/visibility at assembly time):
|
|
36
37
|
|
|
37
38
|
```ts
|
|
38
|
-
await memory.recall(query, { topK?, messageRange?, signal? })
|
|
39
|
+
await memory.recall(query, { topK?, messageRange?, requireConsent?, signal? })
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Consent + lifecycle (real grant/correct/delete/retention on stored entries):
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
await memory.setConsent(entryId, { visible?: boolean, source?, scope? }) // grant/revoke; no re-embed
|
|
46
|
+
await memory.correct(entryId, text) // re-embeds, preserves consent
|
|
47
|
+
await memory.forget({ ids? }) // real delete (whole thread if no ids)
|
|
48
|
+
await memory.applyRetention({ maxAgeDays?, maxEntries?, batchSize? }) // bounded real-delete sweep
|
|
39
49
|
```
|
|
40
50
|
|
|
41
51
|
## Outputs / response / events
|
|
@@ -44,7 +54,10 @@ await memory.recall(query, { topK?, messageRange?, signal? })
|
|
|
44
54
|
| --- | --- |
|
|
45
55
|
| `updateWorking` / `getWorking` | Versioned `WorkingMemoryRecord` |
|
|
46
56
|
| `remember` | `{ accepted, pending, done }` — default `wait: false` indexes asynchronously |
|
|
47
|
-
| `recall` | `{ hits, adjacent }` tenant/thread scoped |
|
|
57
|
+
| `recall` | `{ hits, adjacent }` tenant/thread scoped; invisible/revoked entries excluded |
|
|
58
|
+
| `setConsent` / `correct` | Updated `MemoryVectorRecord` with stamped grant/revoke times |
|
|
59
|
+
| `forget` | Removed count (real delete) |
|
|
60
|
+
| `applyRetention` | `{ deleted, scanned }` bounded real-delete sweep |
|
|
48
61
|
| `createContextProvider()` | Inert `ContextProvider` blocks for working and/or semantic text |
|
|
49
62
|
| `createWorkingMemoryProcessor({ extract })` | Explicit host-invoked updater; never auto-runs |
|
|
50
63
|
|
|
@@ -131,6 +144,7 @@ const memory = createMemory({
|
|
|
131
144
|
- The working-memory processor is opt-in and host-invoked; middleware is not required.
|
|
132
145
|
- `createHashEmbedder()` is for tests/demos only; production hosts supply a real `Embedder`.
|
|
133
146
|
- Observational memory (`@arnilo/prism-compaction-observational-memory`) remains unchanged and composable.
|
|
147
|
+
- Consent is enforced at the single `recall()` gate, so both direct recall and `createContextProvider()` injection honor it; `visible: false` (or a revoked grant) keeps an entry out of prompts, events, exports, and telemetry. `setConsent`/`correct` re-upsert in place (consent change does not re-embed); `forget`/`applyRetention` are real deletes, not tombstones. Retention sweeps scan one thread and delete in bounded batches (default 500 / hard 5000) — no full-corpus scan per run. The PostgreSQL adapter persists consent in a `consent JSONB` column added by `buildMemoryDdl`.
|
|
134
148
|
- Profile bundles do not include this package yet.
|
|
135
149
|
|
|
136
150
|
Shared conformance:
|
|
@@ -149,6 +163,7 @@ await runMemoryConformance(() => ({
|
|
|
149
163
|
|
|
150
164
|
- Every write/query/delete requires `tenantId` + `resourceId`; semantic paths also require `threadId`.
|
|
151
165
|
- Cross-tenant and cross-thread access is denied.
|
|
166
|
+
- Revoked/invisible/non-consented memories never enter prompts, events, exports, or telemetry; `requireConsent: true` additionally drops consent-less (legacy) entries. Consent checks are O(hits) at recall, within the existing injected-token cap.
|
|
152
167
|
- Configure `secrets` / `redactor` so memory text and metadata cannot persist or inject raw canaries.
|
|
153
168
|
- Injected context is inert text — it cannot grant tools or permissions.
|
|
154
169
|
- Hard caps: top-K ≤ 32, messageRange ≤ 4, embed batch ≤ 128, injected tokens ≤ 8000, payload/working-memory byte limits enforced.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arnilo/prism",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "Agent harness for AI providers, agents, sessions, and tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -119,6 +119,9 @@
|
|
|
119
119
|
"packages/server",
|
|
120
120
|
"packages/supervisor",
|
|
121
121
|
"packages/web-tools",
|
|
122
|
+
"packages/work-tools",
|
|
123
|
+
"packages/policy",
|
|
124
|
+
"packages/model-router",
|
|
122
125
|
"packages/browser",
|
|
123
126
|
"packages/ag-ui",
|
|
124
127
|
"packages/prism-*"
|
|
@@ -72,5 +72,27 @@
|
|
|
72
72
|
"imports": "import { createAgent } from \"@arnilo/prism\";\nimport {\n createNeuralWattProvider,\n defineNeuralWattModel,\n} from \"@arnilo/prism-provider-neuralwatt\";",
|
|
73
73
|
"providerExpression": "createNeuralWattProvider({\n apiKey: () => process.env.NEURALWATT_API_KEY,\n })",
|
|
74
74
|
"modelExpression": "defineNeuralWattModel({\n model: \"glm-5.2\",\n cache: { kind: \"implicit\" },\n })"
|
|
75
|
+
},
|
|
76
|
+
"alibaba": {
|
|
77
|
+
"id": "alibaba",
|
|
78
|
+
"packageName": "@arnilo/prism-provider-alibaba",
|
|
79
|
+
"envKey": "DASHSCOPE_API_KEY",
|
|
80
|
+
"envPlaceholder": "sk-...",
|
|
81
|
+
"modelProvider": "alibaba",
|
|
82
|
+
"modelName": "qwen-plus",
|
|
83
|
+
"imports": "import { createAgent } from \"@arnilo/prism\";\nimport {\n createAlibabaProvider,\n defineAlibabaModel,\n} from \"@arnilo/prism-provider-alibaba\";",
|
|
84
|
+
"providerExpression": "createAlibabaProvider({\n apiKey: () => process.env.DASHSCOPE_API_KEY,\n })",
|
|
85
|
+
"modelExpression": "defineAlibabaModel({ model: \"qwen-plus\" })"
|
|
86
|
+
},
|
|
87
|
+
"ollama": {
|
|
88
|
+
"id": "ollama",
|
|
89
|
+
"packageName": "@arnilo/prism-provider-ollama",
|
|
90
|
+
"envKey": "OLLAMA_API_KEY",
|
|
91
|
+
"envPlaceholder": "your-ollama-api-key",
|
|
92
|
+
"modelProvider": "ollama",
|
|
93
|
+
"modelName": "gpt-oss:20b",
|
|
94
|
+
"imports": "import { createAgent } from \"@arnilo/prism\";\nimport {\n createOllamaProvider,\n defineOllamaModel,\n} from \"@arnilo/prism-provider-ollama\";",
|
|
95
|
+
"providerExpression": "createOllamaProvider({\n apiKey: () => process.env.OLLAMA_API_KEY,\n })",
|
|
96
|
+
"modelExpression": "defineOllamaModel({ model: \"gpt-oss:20b\" })"
|
|
75
97
|
}
|
|
76
98
|
}
|