@pikku/core 0.12.97 → 0.12.99
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 +78 -0
- package/dist/classification/data-classification.d.ts +10 -0
- package/dist/classification/data-lock.d.ts +80 -0
- package/dist/classification/data-lock.js +146 -0
- package/dist/classification/index.d.ts +1 -0
- package/dist/classification/index.js +1 -0
- package/dist/classification/key-ids.d.ts +2 -0
- package/dist/classification/key-ids.js +2 -0
- package/dist/middleware/index.d.ts +1 -1
- package/dist/middleware/index.js +1 -1
- package/dist/middleware/require-unlocked.d.ts +23 -0
- package/dist/middleware/require-unlocked.js +21 -0
- package/dist/services/http-personas.d.ts +10 -4
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +1 -0
- package/dist/services/persona-actor-secret.d.ts +38 -0
- package/dist/services/persona-actor-secret.js +39 -0
- package/dist/services/persona-sign-in.d.ts +11 -1
- package/dist/services/persona-sign-in.js +10 -1
- package/dist/services/typed-secret-service.js +4 -1
- package/dist/wirings/agent-scorer/agent-scorer.d.ts +14 -0
- package/dist/wirings/data-lock/data-lock-wiring.d.ts +40 -0
- package/dist/wirings/data-lock/data-lock-wiring.js +77 -0
- package/dist/wirings/data-lock/index.d.ts +9 -0
- package/dist/wirings/data-lock/index.js +8 -0
- package/dist/wirings/gateway/gateway.types.d.ts +13 -0
- package/dist/wirings/persona/index.d.ts +2 -1
- package/dist/wirings/persona/index.js +1 -0
- package/dist/wirings/secret/secret.types.d.ts +8 -0
- package/dist/wirings/virtual-user/virtual-user-scaffold.d.ts +7 -1
- package/dist/wirings/virtual-user/virtual-user-scaffold.js +25 -3
- package/knowledge/decisions/internals/a-virtual-user-cadence-is-a-row-not-a-timer.md +1 -1
- package/knowledge/decisions/internals/a-virtual-user-run-is-not-a-workflow-but-it-needs-a-trigger.md +65 -0
- package/knowledge/decisions/internals/index.md +1 -1
- package/knowledge/decisions/security/actor-sign-in-only-works-for-actor-flagged-users.md +19 -15
- package/knowledge/decisions/security/an-actor-credential-is-derived-per-persona.md +41 -0
- package/knowledge/decisions/security/index.md +2 -1
- package/package.json +4 -4
- package/src/classification/data-classification.ts +10 -0
- package/src/classification/index.ts +2 -0
- package/src/classification/key-ids.ts +2 -0
- package/src/middleware/index.ts +0 -1
- package/src/public-surface.json +13 -1
- package/src/services/http-personas-converse.test.ts +3 -3
- package/src/services/http-personas.test.ts +13 -5
- package/src/services/http-personas.ts +10 -3
- package/src/services/index.ts +8 -0
- package/src/services/persona-actor-secret.test.ts +68 -0
- package/src/services/persona-actor-secret.ts +70 -0
- package/src/services/persona-sign-in.ts +20 -2
- package/src/services/typed-secret-service.test.ts +26 -1
- package/src/services/typed-secret-service.ts +4 -1
- package/src/wirings/agent-scorer/agent-scorer.ts +14 -0
- package/src/wirings/gateway/gateway.types.ts +20 -1
- package/src/wirings/persona/index.ts +9 -0
- package/src/wirings/secret/secret.types.ts +8 -0
- package/src/wirings/virtual-user/virtual-user-scaffold.test.ts +59 -0
- package/src/wirings/virtual-user/virtual-user-scaffold.ts +37 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/knowledge/decisions/internals/a-virtual-user-run-is-not-a-workflow-and-not-a-queued-job.md +0 -53
package/knowledge/decisions/internals/a-virtual-user-run-is-not-a-workflow-and-not-a-queued-job.md
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: A virtual user run is not a workflow and not a queued job
|
|
4
|
-
description: runVirtualUser writes its record, dispatches the run without awaiting it, and returns the id — because an exploratory run has nothing to replay and the record already carries what a queue would be holding
|
|
5
|
-
tags: virtual-user, storage
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# A virtual user run is not a workflow and not a queued job
|
|
9
|
-
|
|
10
|
-
`runVirtualUser` — the RPC `scaffold.virtualUser` generates — does three things
|
|
11
|
-
in order: writes a `VirtualUserRunStore` record, dispatches
|
|
12
|
-
`executeVirtualUserRun` **without awaiting it**, and returns the `runId`. There
|
|
13
|
-
is no workflow, no queue, and no worker.
|
|
14
|
-
|
|
15
|
-
Both of the alternatives are the obvious ones, and both are wrong for this.
|
|
16
|
-
|
|
17
|
-
**A workflow** is a replayable step graph: its value is that a run can be
|
|
18
|
-
resumed at the step it died on, and that the same input reaches the same step.
|
|
19
|
-
A virtual user is the opposite by construction — it is an LLM deciding what to
|
|
20
|
-
try next, so no two attempts take the same steps, and there is no step to resume
|
|
21
|
-
_to_. Recording a run as a workflow puts entries in the workflow store that can
|
|
22
|
-
never be replayed, and gives every operator reading that store a row that lies
|
|
23
|
-
about what it is. The seed makes a run _reproducible_ — run it again and it
|
|
24
|
-
explores the same way — which is a different property from resumable, and one
|
|
25
|
-
the record already carries.
|
|
26
|
-
|
|
27
|
-
**A queue** buys durability across a restart and a retry on failure. It costs a
|
|
28
|
-
broker dependency in every application that turns the scaffold on, plus a worker
|
|
29
|
-
whose progress cannot be read anyway: the run's state lives in the store, not in
|
|
30
|
-
the queue entry. The queue would be holding a copy of what the record already
|
|
31
|
-
has, on the way to the same place.
|
|
32
|
-
|
|
33
|
-
So the record is the run's only trace, and that is what `VirtualUserRunStore`
|
|
34
|
-
exists for. It is also why `fail()` is a method rather than an absence: a run
|
|
35
|
-
that crashed and a run that found nothing are different answers, and a record
|
|
36
|
-
left at `running` is neither.
|
|
37
|
-
|
|
38
|
-
The cost is real and is stated on the type: **a restart mid-run strands a record
|
|
39
|
-
at `running` with nothing left to finish it.** A run older than its budget
|
|
40
|
-
window and still `running` is dead, not working — a read-side rule, and cheaper
|
|
41
|
-
than the two dependencies avoided. Nothing retries; a stranded run is started
|
|
42
|
-
again, with its seed if the caller wants the same exploration.
|
|
43
|
-
|
|
44
|
-
Where that rule is actually applied is
|
|
45
|
-
[the schedule tick](a-virtual-user-cadence-is-a-row-not-a-timer.md), which has
|
|
46
|
-
to: a record stuck at `running` would otherwise block its persona's cadence
|
|
47
|
-
forever.
|
|
48
|
-
|
|
49
|
-
**What this rules out:** dispatching the run through `startWorkflow`; a
|
|
50
|
-
scaffolded queue worker; awaiting the engine inside the request (a run takes
|
|
51
|
-
minutes and survives neither a rollout nor a proxy timeout); and inferring
|
|
52
|
-
`status` from `finishedAt` being unset, which cannot separate a crash from a run
|
|
53
|
-
still going.
|