@ref0/sdk 0.6.0 → 0.8.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/README.md +2 -2
- package/dist/{browse-DHgV6DTF.d.mts → browse-DZcR8vTe.d.mts} +2 -2
- package/dist/browser.d.mts +1 -1
- package/dist/client.d.mts +2 -2
- package/dist/client.mjs +163 -82
- package/dist/{index-CJGX88qF.d.mts → index-Bm4HWooV.d.mts} +326 -101
- package/dist/index.d.mts +12 -7
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as StartActor, A as ForkOptions, B as WorkflowContext, C as Comment, D as EventWorkflow, E as EventOf, F as StepConfig, G as CalledWorkflow, H as text, I as StepContext, J as TreeEntry, K as JsonValue, L as ThreadStart, M as PullRequestAnswer, N as PullRequestOptions, O as EventWorkflowSpec, P as Ref0Actions, Q as Refusal, R as WaitType, S as CheckRunEnded, T as Duration, U as workflow, V as WorkflowStep, W as CalledRunFailed, X as Allow, Y as TreeRead, Z as CalledRun, _ as ActionAnswer, a as CheckRunOptions, at as allow, b as CalledContext, c as CheckRunResult, ct as Need, d as OneOfValues, et as StartContext, f as OutputResult, g as oneOf, h as check, i as CheckResult, it as StartRun, j as NeedAddOptions, k as ForkAnswer, l as CheckSpec, m as Step, n as Check, nt as StartOutput, o as CheckRunReference, ot as refuse, p as OutputSchema, q as Tree, r as CheckContext, rt as StartRule, s as CheckRunRefused, st as CheckNeed, t as Browser, tt as StartItem, u as DurationText, v as CallAnswer, w as ConnectionsOf, x as CalledWorkflowSpec, y as CallEnded, z as WaitedEvent } from "./browse-
|
|
1
|
+
import { $t as WorkflowAskClosed, In as WorkflowText, Nn as WorkflowRequestRefusal, Ot as SandboxPushAnswer, Qt as WorkflowAsk, W as GateOwn, Zt as WorkflowAnswerer, h as ChangeAuthor, kt as SandboxSize, lt as PasskeyFrom$1, qt as VersionFile, ut as PasskeyRefusal, vt as Ref0Owned } from "./index-Bm4HWooV.mjs";
|
|
2
|
+
import { $ as StartActor, A as ForkOptions, B as WorkflowContext, C as Comment, D as EventWorkflow, E as EventOf, F as StepConfig, G as CalledWorkflow, H as text, I as StepContext, J as TreeEntry, K as JsonValue, L as ThreadStart, M as PullRequestAnswer, N as PullRequestOptions, O as EventWorkflowSpec, P as Ref0Actions, Q as Refusal, R as WaitType, S as CheckRunEnded, T as Duration, U as workflow, V as WorkflowStep, W as CalledRunFailed, X as Allow, Y as TreeRead, Z as CalledRun, _ as ActionAnswer, a as CheckRunOptions, at as allow, b as CalledContext, c as CheckRunResult, ct as Need, d as OneOfValues, et as StartContext, f as OutputResult, g as oneOf, h as check, i as CheckResult, it as StartRun, j as NeedAddOptions, k as ForkAnswer, l as CheckSpec, m as Step, n as Check, nt as StartOutput, o as CheckRunReference, ot as refuse, p as OutputSchema, q as Tree, r as CheckContext, rt as StartRule, s as CheckRunRefused, st as CheckNeed, t as Browser, tt as StartItem, u as DurationText, v as CallAnswer, w as ConnectionsOf, x as CalledWorkflowSpec, y as CallEnded, z as WaitedEvent } from "./browse-DZcR8vTe.mjs";
|
|
3
3
|
//#region src/ask.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* `ask`, ref0's leaf that asks someone a question and waits in the run for the answer, as a
|
|
@@ -150,8 +150,10 @@ export declare const local: (need: CheckNeed) => CheckNeed;
|
|
|
150
150
|
/**
|
|
151
151
|
* Who a request asks, as `PasskeyFrom` in `@ref0/contracts` says: the run's accountable person; a
|
|
152
152
|
* person by their name; or anyone holding one of the repo's permissions, the first of whom to
|
|
153
|
-
* answer decides.
|
|
154
|
-
*
|
|
153
|
+
* answer decides. A person or a permission asks someone else, so the run's accountable person never
|
|
154
|
+
* answers it, and one that names them, or a permission only they hold, is refused `self`. The
|
|
155
|
+
* workflow's `permissions.ask` names each kind it asks. An ask's `by` passes as it is:
|
|
156
|
+
* `'accountable'`, or an agent, which is refused `agent`, since an agent has no passkey.
|
|
155
157
|
*/
|
|
156
158
|
type PasskeyFrom = (typeof PasskeyFrom$1)['Encoded'] | {
|
|
157
159
|
readonly agent: string;
|
|
@@ -197,7 +199,8 @@ declare const run: (step: WorkflowStep, options: PasskeyRunOptions) => Promise<P
|
|
|
197
199
|
interface PasskeyCheckOptions {
|
|
198
200
|
/**
|
|
199
201
|
* Who says yes: by default the person behind the run that meets the need, a local run's
|
|
200
|
-
* signer's person, or the version's accountable person for a run of ref0's own.
|
|
202
|
+
* signer's person, or the version's accountable person for a run of ref0's own. A person or a
|
|
203
|
+
* permission asks someone else, so the person behind the run never answers it.
|
|
201
204
|
*/
|
|
202
205
|
readonly from?: (typeof PasskeyFrom$1)['Encoded'];
|
|
203
206
|
}
|
|
@@ -206,8 +209,10 @@ interface PasskeyCheckOptions {
|
|
|
206
209
|
* `passkey.check(local(e2e()))`, or `passkey.check(e2e(), { from: { permission: 'qa' } })` to ask
|
|
207
210
|
* someone else. For each part, ref0 asks for a yes to a statement that names the run that meets it,
|
|
208
211
|
* its check-run identity, its conclusion and its outputs' hash, and the part waits for that yes. A
|
|
209
|
-
* newer run that counts asks again.
|
|
210
|
-
* on a run of ref0's, or
|
|
212
|
+
* newer run that counts asks again. Someone else is never the person behind the run. A no or the
|
|
213
|
+
* request's day ending waits for a newer local run; on a run of ref0's, or with nobody to ask, a
|
|
214
|
+
* person who can't be asked or nobody but the person behind the run, the check needs an admin's
|
|
215
|
+
* override.
|
|
211
216
|
* When ref0's runs of an identity someone said yes over fail twice, their yes stops answering the
|
|
212
217
|
* check until an admin restores them. It takes a check's need, never a check or another need, and wraps it
|
|
213
218
|
* once, before or after `local`.
|
package/dist/index.mjs
CHANGED
|
@@ -1143,8 +1143,10 @@ const run = async (step, options) => {
|
|
|
1143
1143
|
* `passkey.check(local(e2e()))`, or `passkey.check(e2e(), { from: { permission: 'qa' } })` to ask
|
|
1144
1144
|
* someone else. For each part, ref0 asks for a yes to a statement that names the run that meets it,
|
|
1145
1145
|
* its check-run identity, its conclusion and its outputs' hash, and the part waits for that yes. A
|
|
1146
|
-
* newer run that counts asks again.
|
|
1147
|
-
* on a run of ref0's, or
|
|
1146
|
+
* newer run that counts asks again. Someone else is never the person behind the run. A no or the
|
|
1147
|
+
* request's day ending waits for a newer local run; on a run of ref0's, or with nobody to ask, a
|
|
1148
|
+
* person who can't be asked or nobody but the person behind the run, the check needs an admin's
|
|
1149
|
+
* override.
|
|
1148
1150
|
* When ref0's runs of an identity someone said yes over fail twice, their yes stops answering the
|
|
1149
1151
|
* check until an admin restores them. It takes a check's need, never a check or another need, and wraps it
|
|
1150
1152
|
* once, before or after `local`.
|