@kana-ai/edgar-sdk 0.1.3 → 0.1.5
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 +24 -21
- package/dist/src/build/manifest.d.ts +1 -1
- package/dist/src/build/manifest.js +10 -1
- package/dist/src/define/context.d.ts +4 -0
- package/dist/src/define/extension.d.ts +3 -0
- package/dist/src/define/setup.d.ts +27 -0
- package/dist/src/define/setup.js +30 -0
- package/dist/src/define/tool.d.ts +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/outcome/end.d.ts +5 -3
- package/dist/src/outcome/end.js +18 -4
- package/dist/src/runtime/invoke.js +6 -0
- package/dist/src/testing/context.d.ts +3 -1
- package/dist/src/testing/context.js +8 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,17 +6,17 @@ Use the SDK when you write an extension: a tool that a stage or a role calls, a
|
|
|
6
6
|
|
|
7
7
|
## Entry points
|
|
8
8
|
|
|
9
|
-
| Import | What it holds
|
|
10
|
-
| ------------------------------- |
|
|
11
|
-
| `@kana-ai/edgar-sdk` | `defineExtension`, `defineTool`, `disableTool`, `defineTracker`, the card block helpers, `defineEnvironment`, `defineGitCredential`, `defineCommitPublisher`, `defineIdentity`, `defineReadLink`, `defineHook`, `defineEventHook`, `defineService`, `pass`, `deny`, `jsonSchema`, `endNote` and the note helpers, the outcome functions, the failure helpers, the `Result` helpers, and the types `Ctx`, `PortError`, `PortResult` | An extension's `src/index.ts` |
|
|
12
|
-
| `@kana-ai/edgar-sdk/result` | `Result`, `ok`, `err`, `attempt`, `attemptAsync`, `map`, `mapError`, `andThen`, `unwrapOr`, `all`, `expectOk`
|
|
13
|
-
| `@kana-ai/edgar-sdk/testing` | `testContext`, `mockOrigin`, `reportedLimit`
|
|
14
|
-
| `@kana-ai/edgar-sdk/build` | `toManifest`, `unlistedHosts`, `undescribedSettings`
|
|
15
|
-
| `@kana-ai/edgar-sdk/runtime` | `invoke`, `callables`, the network policy
|
|
16
|
-
| `@kana-ai/edgar-sdk/codec` | The JSON-RPC line codec, `CONTRACT`, `errorCodes`
|
|
17
|
-
| `@kana-ai/edgar-sdk/provider` | `serve`, `toolRequest`, `failedSession`, `skillList`
|
|
18
|
-
| `@kana-ai/edgar-sdk/child` | `spawnVendor`, `channel`
|
|
19
|
-
| `edgar-extension-build <entry>` | The command that writes the manifest and the schemas
|
|
9
|
+
| Import | What it holds | Use it in |
|
|
10
|
+
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------- |
|
|
11
|
+
| `@kana-ai/edgar-sdk` | `defineExtension`, `defineTool`, `disableTool`, `defineTracker`, the card block helpers, `defineEnvironment`, `defineGitCredential`, `defineCommitPublisher`, `defineIdentity`, `defineReadLink`, `defineSetup` with `probePassed`, `probeFailed` and `probeSkipped`, `defineHook`, `defineEventHook`, `defineService`, `pass`, `deny`, `jsonSchema`, `endNote` and the note helpers, the outcome functions, the failure helpers, the `Result` helpers, and the types `Ctx`, `PortError`, `PortResult` | An extension's `src/index.ts` |
|
|
12
|
+
| `@kana-ai/edgar-sdk/result` | `Result`, `ok`, `err`, `attempt`, `attemptAsync`, `map`, `mapError`, `andThen`, `unwrapOr`, `all`, `expectOk` | Any module that returns a failure as a value |
|
|
13
|
+
| `@kana-ai/edgar-sdk/testing` | `testContext`, `mockOrigin`, `reportedLimit` | An extension's unit tests |
|
|
14
|
+
| `@kana-ai/edgar-sdk/build` | `toManifest`, `unlistedHosts`, `undescribedSettings` | The build command; you do not need it in an extension |
|
|
15
|
+
| `@kana-ai/edgar-sdk/runtime` | `invoke`, `callables`, the network policy | The extension runtime, `apps/runtime` |
|
|
16
|
+
| `@kana-ai/edgar-sdk/codec` | The JSON-RPC line codec, `CONTRACT`, `errorCodes` | The runtimes |
|
|
17
|
+
| `@kana-ai/edgar-sdk/provider` | `serve`, `toolRequest`, `failedSession`, `skillList` | A provider runtime, `apps/provider-<name>` |
|
|
18
|
+
| `@kana-ai/edgar-sdk/child` | `spawnVendor`, `channel` | A provider runtime that drives a vendor's program |
|
|
19
|
+
| `edgar-extension-build <entry>` | The command that writes the manifest and the schemas | An extension's `build` script |
|
|
20
20
|
|
|
21
21
|
## Define an extension
|
|
22
22
|
|
|
@@ -63,6 +63,7 @@ A tool's full name is `<extension>__<tool>`, so a workflow calls this one as `no
|
|
|
63
63
|
| `commitPublisher` | What publishes the commits of EDGAR's pushes on a host so the host signs them, from `defineCommitPublisher`. See [Trackers, hooks and environments](#trackers-hooks-and-environments). |
|
|
64
64
|
| `identity` | What says who sends a request through a sign-in proxy, from `defineIdentity`. See [Trackers, hooks and environments](#trackers-hooks-and-environments). |
|
|
65
65
|
| `readLink` | What reads a link of the extension's own product for a run's inbox, from `defineReadLink`. See [Trackers, hooks and environments](#trackers-hooks-and-environments). |
|
|
66
|
+
| `setup` | The live setup probes that `edgar check --live` runs, from `defineSetup`. See [Trackers, hooks and environments](#trackers-hooks-and-environments). |
|
|
66
67
|
| `service` | The extension's long-lived service, from `defineService`. See [Trackers, hooks and environments](#trackers-hooks-and-environments). |
|
|
67
68
|
| `chatFiles` | `{ hosts, secret }`: the hosts, each named in full, of the files a person shares in a chat with the service, and the secret that the engine sends to them as a bearer token when it fetches one into the run's inbox. The engine sends it to no other host, never on a command line, and never with a card's attachments. |
|
|
68
69
|
| `webhooks` | Webhook routes. A tracker's webhook needs `signature: "hmac-sha256"`, a `secret` and a `signature_header`, and a signed delivery to `/hooks/<extension>/<route>` wakes the sweep. `edgar check` notes another extension's webhook as `W023` at `info`: nothing serves it. |
|
|
@@ -108,14 +109,15 @@ The build writes the key `executables`, with both lists, only when the extension
|
|
|
108
109
|
|
|
109
110
|
### The capabilities
|
|
110
111
|
|
|
111
|
-
| Capability | What it allows
|
|
112
|
-
| ------------------------------- |
|
|
113
|
-
| `network:<host>` | `fetch` to that host. A call to any other host fails with `refused` before it connects.
|
|
114
|
-
| `sandbox:read`, `sandbox:write` | `ctx.sandbox.read`, and `ctx.sandbox.write` and `ctx.sandbox.exec`.
|
|
115
|
-
| `git:push` | A push of one `edgar/` branch of the run's work to origin: the call asks `git push origin <branch>` and `git rev-parse --verify <ref>`, with no flag, no `+` and no `src:dst`. The engine does the push itself, never forced, with the git credentials of the machine, after its secret file scan; git in the sandbox holds no credential. No other command runs without `sandbox:write`.
|
|
116
|
-
| `tracker:read`, `tracker:write` | `ctx.tracker`: the tracker's reads, and its writes.
|
|
117
|
-
| `runs:read` | `ctx.runs.read(runId)`.
|
|
118
|
-
| `complete` | `ctx.complete(key, outcome)`, which completes a waiting attempt.
|
|
112
|
+
| Capability | What it allows |
|
|
113
|
+
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
114
|
+
| `network:<host>` | `fetch` to that host. A call to any other host fails with `refused` before it connects. |
|
|
115
|
+
| `sandbox:read`, `sandbox:write` | `ctx.sandbox.read`, and `ctx.sandbox.write` and `ctx.sandbox.exec`. |
|
|
116
|
+
| `git:push` | A push of one `edgar/` branch of the run's work to origin: the call asks `git push origin <branch>` and `git rev-parse --verify <ref>`, with no flag, no `+` and no `src:dst`. The engine does the push itself, never forced, with the git credentials of the machine, after its secret file scan; git in the sandbox holds no credential. No other command runs without `sandbox:write`. |
|
|
117
|
+
| `tracker:read`, `tracker:write` | `ctx.tracker`: the tracker's reads, and its writes. |
|
|
118
|
+
| `runs:read` | `ctx.runs.read(runId)`. |
|
|
119
|
+
| `complete` | `ctx.complete(key, outcome)`, which completes a waiting attempt. |
|
|
120
|
+
| `environment:docker` | For a step of an environment only: the step's `ctx.sandbox.exec` of its own stack's `docker` commands runs on the machine, in the run's checkout, outside the command sandbox and `[sandbox] deny`. The engine checks each command first: the `docker compose` commands of the Docker extension's steps on the project `edgar-<service>-<run>`, `docker volume inspect` and the copy of that stack's volumes, and `readlink -f`. Any other command goes to the sandbox. |
|
|
119
121
|
|
|
120
122
|
### The tool context, `ctx`
|
|
121
123
|
|
|
@@ -157,13 +159,14 @@ A tool that throws ends as `permanent_failure(tool_error)`, which the engine nev
|
|
|
157
159
|
- `defineHook({ on, secrets, capabilities, check })` runs before (`before_tool`) or after (`after_tool`) each tool call that `[hooks] order` names it for. `check` returns `pass()`, or `deny(code, reason)`, which ends the call `permanent_failure(denied_by_hook)` with the reason.
|
|
158
160
|
- A tracker's `mentions` is optional: a tracker that has it answers the comments made after `since` on any card that mention EDGAR's account, each with its `card`, and the engine reads it once a sweep so a mention on a card that no run holds starts the `mention` workflow.
|
|
159
161
|
- `defineEventHook({ events, secrets, capabilities, deliver })` gets the events of each run whose kind is in `events`, in order per run and at least once. `deliver(event, ctx)` answers `done({})` once it took the event. A failure has the engine hand the event again, up to five times, with a backoff from one second; only the later events of that run wait meanwhile, so the other runs go on. After the last try, or at once on a permanent failure, the event is set aside with an `alert`, and `edgar outbox hooks` lists it. Each delivery has its own operation id, the same on each try. Use it to tell people about a run in a chat or by mail.
|
|
160
|
-
- `endNote(event, style, consoleUrl?)` writes the note at the end of a run from its `run_outcome` event. It answers `{ what, outcome, card, assignee, lines, facts }`; `outcome` is the run's outcome as the engine names it, such as `done` or `permanent_failure`. `lines` are, in order: who the card is assigned to, the card, what EDGAR did, and what the run used. `assignee` is the name of the person the card is assigned to, as the card has it, and is there only for an assigned card. When it is set, the first of `lines` is the line that names that person, so a medium that can mention a person writes its own first line. `what` is the one thing a person must know: `opened` (a pull request), `merged`, `approved`, `changes` or `closed` (what people decided on the pull request, from the `reviewed` record of the `end` of a run with a card; a run with no card, such as a schedule that reads each pull request, never says a decision; `facts` then has `approvedBy`, the logins that approved, and `commit`, the first 7 characters of the merge commit of a merged pull request, and the lines carry no summary of the proposal), `decision`, `waits` (the run decided to wait, so it did not finish, and its line says what it waits on), `failed`, `stopped
|
|
162
|
+
- `endNote(event, style, consoleUrl?)` writes the note at the end of a run from its `run_outcome` event. It answers `{ what, outcome, card, assignee, lines, facts }`; `outcome` is the run's outcome as the engine names it, such as `done` or `permanent_failure`. `lines` are, in order: who the card is assigned to, the card, what EDGAR did, and what the run used. `assignee` is the name of the person the card is assigned to, as the card has it, and is there only for an assigned card. When it is set, the first of `lines` is the line that names that person, so a medium that can mention a person writes its own first line. `what` is the one thing a person must know: `opened` (a pull request), `merged`, `approved`, `changes` or `closed` (what people decided on the pull request, from the `reviewed` record of the `end` of a run with a card; a run with no card, such as a schedule that reads each pull request, never says a decision; `facts` then has `approvedBy`, the logins that approved, and `commit`, the first 7 characters of the merge commit of a merged pull request, and the lines carry no summary of the proposal), `decision`, `handed` (a stage handed the card back to a person, from `handed_to` of the `end` record; its line says "I handed the card to <person>." with the question the run left, else its summary, and `facts` has `handedTo`), `waits` (the run decided to wait, so it did not finish, and its line says what it waits on), `failed`, `stopped` (its line names who stopped the run when the engine recorded a person, and `facts` has `stoppedBy`), `done` or `recovered`. `facts` holds the same note as plain values that no style changed, for a medium that lays the note out by itself, as `@kana-ai/edgar-ext-slack` does: the run, how long it took, its tokens (left out for a run with no model token) and cost, the address of the run's page, the workflow, each pull request as `{ url, label }`, with `referenced: true` for one that the run did not open but worked on or found, the risk sentence, the summary and the options of the proposal, and for a failed run its stage, its message as the engine wrote it, and `why`, that message in plain words when its failure word is a known one. `notePull(url, number, referenced?)` gives the `{ url, label }` of one pull request, with the label `<repository>#<number>` and `referenced: true` when you pass it, or `undefined` for an address that is not `http` or `https`. "I opened" names only the pull requests that the run opened; the note links each other one after what the run did, as "See the pull request:". After the pull requests, the note says "The merge risk is <risk>: <the first sentence of risk_reason>." when the `end` record has a `risk` that is one word other than `low`. `style` says how your medium writes a link and makes a text safe: `{ link: (url, label) => string, text: (text) => string }`. Pass `consoleUrl` only when people can open the console at that address. When the `end` or the `totals` of a payload does not read, the note is written from the `outcome` alone, so it still says whether the run finished. It answers `undefined` for any other event, and for a `run_outcome` payload whose `outcome` it cannot read, so say in your medium that the run is over. `cardLine(card, style)` writes the card line alone, and `noteCard(runCard.parse(payload))` reads the card of a `run_created` payload, so the first message about a run can name its card as the end note does.
|
|
161
163
|
- `defineEnvironment({ prepare, start, health, stop })` declares a service's running stack, each step a tool. A service names it with `[services.<name>] environment = { provider = "<ext>__<name>" }`. The stack is up only for a `check` stage, and one stack of a service is up at a time: a `check` stage that waits for it gives back its slot and takes the stack in the order the stages asked. For each `check` stage, the engine calls `stop` first, because a crash, a timeout or a failed `stop` can leave a stack up. Then it calls `prepare`, `start` and `health`, runs the checks, and calls `stop` again, also after a failed step. Each step gets the input `{ service, slot, run }`, where `slot` is always 1 and `run` is the sandbox's run, so a fixed port or Compose project name is safe. A failed step before the checks fails the stage with the step's name; a failed last `stop` writes an `alert`, and the next stage's first `stop` tries again. Each step must therefore be idempotent. A step that grants `sandbox:read` or `sandbox:write` runs in the run's sandbox.
|
|
162
164
|
- `defineGitCredential({ secrets, capabilities, token })` declares what mints the token that EDGAR's own git sends to a host, such as a GitHub App's installation token. A project uses it with `[sandbox] git_tokens = { "<host>" = { extension = "<name>" } }`. Before a git step reaches that host, the engine calls `token(ctx, host, scope)` when it holds no token of the step's scope or holds one that expires within five minutes. `scope` is a `GitScope`: `repository`, the path of the step's repository URL such as `owner/name`, and `access`, `"read"` for a clone or fetch and `"write"` for a push. A `repository` of `null` reads any repository the token reaches, as a submodule fill does. Mint a token that covers no more than `scope` when the host can narrow one. `token` returns `ok({ token, expires_at_ms })`, with `expires_at_ms` the Unix time in milliseconds when the token expires, or `null` for a token that does not expire, or `err(failure)`. The engine keeps the token in memory only, adds it to the redaction filter, and gives it to no stage, role or sandbox command. The manifest key is `git_credential`, and the engine calls it as `tool.call` of `git_credential` with the input `{ host, repository, access }`.
|
|
163
165
|
- `defineCommitPublisher({ secrets, capabilities, publish })` declares what publishes the commits of EDGAR's pushes on a host, so the host signs them, such as through GitHub's Git Data API. A project uses it with `[sandbox] signed_commits = { "<host>" = "<name>" }`. For each push, the engine calls `publish(ctx, plan)` with a `CommitPlan`: `host`, `repository` (`owner/name`), `branch`, `from` (the branch's commit on the host, or `null` for a new branch), `base` (the commit the first planned commit stands on) and `commits`, oldest first, each `{ id, tree, message, changes }` with each file it writes (`{ kind: "write", path, mode, blob, content }`, the bytes in base64) or deletes (`{ kind: "delete", path }`). `publish` makes each commit on the one before, checks that each tree the host made equals the planned `tree`, moves the branch without force, and answers the id of each commit it made, in order, or the failure that left the branch where it was. The engine fetches the commits, refuses any whose tree or parent differs, and moves the run's work onto them.
|
|
164
166
|
- `defineIdentity({ headers, secrets, capabilities, identify })` declares what says who sends a request through a sign-in proxy, such as `@kana-ai/edgar-ext-iap` for Google Cloud's Identity-Aware Proxy. A project uses it with `[api] public_url` and `[api] identity = { extension = "<name>" }`. `headers` lists the request headers it reads, in lower case; `authorization`, `cookie` and `host` are refused. For a request to the host of `public_url`, the engine calls `identify(ctx, headers)` with only the listed headers that the request carries. `identify` returns `ok({ email, expires_at_ms })`, with `expires_at_ms` the Unix time in milliseconds until which the engine may keep the answer, or `err(failure)`, whose message the person sees with `403`. The engine keeps each answer in memory only, keyed by the SHA-256 of the headers, and acts as the person of `[people]` with that email. The manifest key is `identity`, with `headers`, `secrets` and `capabilities`, and the engine calls it as `tool.call` of `identity` with the input `{ headers }`.
|
|
165
167
|
- `defineReadLink({ hosts, secrets, capabilities, read })` declares what reads a link of the extension's own product, such as a chat thread or a card, that a card or its comments hold. `hosts` lists the hosts of those links in lower case, with `*.` for every host under a domain. Before an agent stage starts, the engine finds the `https` links of the card's description and of each comment that is not EDGAR's, and for each one calls `read(ctx, url)` of the first enabled extension whose `hosts` claim it. `read` returns `ok({ kind: "read", title, text })`, `ok({ kind: "not_mine" })` for a link of its hosts that it does not read, or `err(failure)`. The engine writes the answers to `/tmp/inbox/links.md`, at most 5 links, each text cut at 8 KiB and all at 32 KiB, with emails hidden. A failure is one line there and never fails the stage, and a link inside a linked text is not read. The manifest key is `read_link`, with `hosts`, `secrets` and `capabilities`, and the engine calls it as `tool.call` of `read_link` with the input `{ url }`. A tracker's reader answers a card with `cardRead(card, comments)`, which gives the card's id and title as the title, and its column, link, description and comments as the text, so every linked card reads the same way.
|
|
166
|
-
- `
|
|
168
|
+
- `defineSetup({ secrets, capabilities, probes })` declares the live setup probes, which `edgar check --live` runs in the worker against the extension's real services. `probes(ctx, { services })` gets the project's `[services]` and returns one probe for each check: `probePassed(label)`, `probeFailed(label, reason, fix)` or `probeSkipped(label, why)`, where `label` says what it checks, such as "the token reads acme/api". A probe only reads: `capabilities` takes `network:<host>` values only, the engine refuses a manifest whose `setup` asks for another, and a probe reaches no engine port. A throw or a failure of the call shows as one failed probe, `its setup probes run`. The engine hides every secret in the answer. The manifest key is `setup`, with `secrets` and `capabilities`, and the engine calls it as `tool.call` of `setup` with the input `{ services }`; the answer's shape is `@kana-ai/edgar-contracts/setup`.
|
|
169
|
+
- `defineService({ secrets, capabilities, run })` declares the extension's long-lived service, such as a listener on a chat platform's socket. `edgar start` runs it once the manifest is approved, and starts it again with a backoff when it stops by itself. `run(ctx, input)` gets the project's `[services]` in `input.services`, each with its `name`, `repo` and `default_branch`. The service opens cards with `ctx.cards.open`, puts a person's reply on the card of a run, or on a card by its key, with `ctx.cards.reply({ run } | { card }, text, by, trust, origin)`, where `trust` is `team` only for a person the service knows is on the team, since EDGAR starts no work that changes code for words from `outside`, and `origin` is the place the reply came from, which the run that it starts names as `relayed`. A card the service opens for a person outside the team says `trust: "outside"` in its block, starts the workflow `chat` on a message with no card with `ctx.runs.chat(text, by, origin, card, files)`, where the optional `files` are those the person shared, which the engine fetches into the run's inbox from a host of `chatFiles`, and sends a person's moves with `ctx.moves`, `ctx.runs.cancel`, `ctx.runs.replay(run, by)`, which starts a finished run again as `edgar run replay` does, and `ctx.runs.stop(run, by, reason)`, which cancels one unfinished run and refuses a finished one. `ctx.moves.allowed(by)` answers whether `by` may make those moves, as a move would answer, so the service can tell the person before it acts. EDGAR decides from the project's `[people]` and `[roles] operator`, and signs the move as `<name>@<extension>` when `[people.<name>] ids` holds the id. What its own platform pushes to it, such as the events of a socket, it stores in EDGAR's inbox with `ctx.inbox.receive(delivery, payload)` before it tells the platform the event arrived, keyed by the platform's own id, so a stop loses nothing and a redelivery answers `stored: false`; it marks each one done with `ctx.inbox.handled(delivery)`, and at start handles what `ctx.inbox.pending()` still holds. These rows show in `edgar inbox list` under the route `service`. Only the service handles them, and it sees only them: a tracker's sweep never marks them handled, and `pending` never hands back a delivery of the extension's webhooks, so one extension can be both a tracker and a service. With the capability `tracker:write`, it also posts on a card with `ctx.tracker.comment` and closes a card with `ctx.tracker.close`. Every other tracker method and sandbox port is refused.
|
|
167
170
|
|
|
168
171
|
## Build the manifest
|
|
169
172
|
|
|
@@ -8,7 +8,7 @@ export interface Built {
|
|
|
8
8
|
/** Turns an extension value into its manifest and schema files; it never runs `execute`. */
|
|
9
9
|
export declare function toManifest(extension: Extension, version: string): Built;
|
|
10
10
|
/**
|
|
11
|
-
* One line for each `network:<host>` of a tool, hook, service, git credential, commit publisher, identity, link reader, tracker or environment step that holds a secret
|
|
11
|
+
* One line for each `network:<host>` of a tool, hook, service, git credential, commit publisher, setup probes, identity, link reader, tracker or environment step that holds a secret
|
|
12
12
|
* while no secret that it holds lists the host. The engine gives such a call only the hosts of its secrets,
|
|
13
13
|
* so the capability is removed at each call and the code fails where no unit test looks.
|
|
14
14
|
*/
|
|
@@ -88,6 +88,14 @@ export function toManifest(extension, version) {
|
|
|
88
88
|
capabilities: [...extension.gitCredential.capabilities],
|
|
89
89
|
},
|
|
90
90
|
}),
|
|
91
|
+
...(extension.setup === undefined
|
|
92
|
+
? {}
|
|
93
|
+
: {
|
|
94
|
+
setup: {
|
|
95
|
+
secrets: [...extension.setup.secrets],
|
|
96
|
+
capabilities: [...extension.setup.capabilities],
|
|
97
|
+
},
|
|
98
|
+
}),
|
|
91
99
|
...(extension.commitPublisher === undefined
|
|
92
100
|
? {}
|
|
93
101
|
: {
|
|
@@ -127,7 +135,7 @@ export function toManifest(extension, version) {
|
|
|
127
135
|
return { manifest, files };
|
|
128
136
|
}
|
|
129
137
|
/**
|
|
130
|
-
* One line for each `network:<host>` of a tool, hook, service, git credential, commit publisher, identity, link reader, tracker or environment step that holds a secret
|
|
138
|
+
* One line for each `network:<host>` of a tool, hook, service, git credential, commit publisher, setup probes, identity, link reader, tracker or environment step that holds a secret
|
|
131
139
|
* while no secret that it holds lists the host. The engine gives such a call only the hosts of its secrets,
|
|
132
140
|
* so the capability is removed at each call and the code fails where no unit test looks.
|
|
133
141
|
*/
|
|
@@ -141,6 +149,7 @@ export function unlistedHosts(manifest) {
|
|
|
141
149
|
...(manifest.git_credential === undefined
|
|
142
150
|
? []
|
|
143
151
|
: [["the git credential", manifest.git_credential]]),
|
|
152
|
+
...(manifest.setup === undefined ? [] : [["the setup probes", manifest.setup]]),
|
|
144
153
|
...(manifest.publish_commits === undefined
|
|
145
154
|
? []
|
|
146
155
|
: [["the commit publisher", manifest.publish_commits]]),
|
|
@@ -53,6 +53,10 @@ export interface Ctx<S extends string = never> {
|
|
|
53
53
|
read(runId: string): Promise<PortResult<RunsReadResult>>;
|
|
54
54
|
/** Cancels every unfinished run whose card came from `origin`; only a service may. */
|
|
55
55
|
cancel(origin: Origin, by: string, reason: string): Promise<PortResult<MoveResult>>;
|
|
56
|
+
/** Starts the finished run `runId` again for the person `by`, as a replay that a person asks for; only a service may, and `by` must be in `[roles] operator`. */
|
|
57
|
+
replay(runId: string, by: string): Promise<PortResult<MoveResult>>;
|
|
58
|
+
/** Cancels the unfinished run `runId` for the person `by`, with `reason`; only a service may, `by` must be in `[roles] operator`, and a finished run is refused. */
|
|
59
|
+
stop(runId: string, by: string, reason: string): Promise<PortResult<MoveResult>>;
|
|
56
60
|
/** Starts the workflow `chat` on what the person `by`, an id with no space, wrote at `origin` with no card: it answers a question there and opens `card` for work. The engine fetches `files`, those the person shared, into the run's inbox from a host of the extension's `chatFiles`. Only a service may. */
|
|
57
61
|
chat(text: string, by: string, origin: Origin, card: CardSpec, files?: readonly Attachment[]): Promise<PortResult<MoveResult>>;
|
|
58
62
|
};
|
|
@@ -5,6 +5,7 @@ import type { EventHook, Hook } from "#define/hook";
|
|
|
5
5
|
import type { Identity } from "#define/identity";
|
|
6
6
|
import type { ReadLink } from "#define/read-link";
|
|
7
7
|
import type { Service } from "#define/service";
|
|
8
|
+
import type { Setup } from "#define/setup";
|
|
8
9
|
import type { Capability, Schema, Tool } from "#define/tool";
|
|
9
10
|
import type { Tracker } from "#define/tracker";
|
|
10
11
|
declare const extensionBrand: unique symbol;
|
|
@@ -43,6 +44,8 @@ export interface ExtensionSpec {
|
|
|
43
44
|
readonly service?: Service;
|
|
44
45
|
/** What mints the token that the engine's git sends to a host of `[sandbox] git_tokens` that names this extension. */
|
|
45
46
|
readonly gitCredential?: GitCredential;
|
|
47
|
+
/** What reads the extension's live services for `edgar check --live`, such as whether its token reads the project's repositories. */
|
|
48
|
+
readonly setup?: Setup;
|
|
46
49
|
/** What publishes the commits of a push on a host of `[sandbox] signed_commits` that names this extension, so the host signs them. */
|
|
47
50
|
readonly commitPublisher?: CommitPublisher;
|
|
48
51
|
/** What says who sends a request to the host of `[api] public_url` for a project whose `[api] identity` names this extension. */
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Probe } from "@kana-ai/edgar-contracts/setup";
|
|
2
|
+
import type { Ctx } from "#define/context";
|
|
3
|
+
import { type ServiceInput } from "#define/service";
|
|
4
|
+
import { type Outcome } from "#outcome/outcome";
|
|
5
|
+
export type { Probe, Verdict } from "@kana-ai/edgar-contracts/setup";
|
|
6
|
+
declare const setupBrand: unique symbol;
|
|
7
|
+
/** A probe that passed. */
|
|
8
|
+
export declare const probePassed: (label: string) => Probe;
|
|
9
|
+
/** A probe that failed: why, and the step that fixes it, such as the scope a token lacks. */
|
|
10
|
+
export declare const probeFailed: (label: string, reason: string, fix: string) => Probe;
|
|
11
|
+
/** A probe that does not apply to this project, and why, such as a webhook check on a project with no webhook. */
|
|
12
|
+
export declare const probeSkipped: (label: string, why: string) => Probe;
|
|
13
|
+
/** What `defineSetup` takes: the grant it runs under, which holds network hosts only, and `probes`, which reads the extension's live services and answers one probe for each thing it checks, made with `probePassed`, `probeFailed` or `probeSkipped`. A probe only reads. */
|
|
14
|
+
export interface SetupSpec<S extends string> {
|
|
15
|
+
readonly secrets?: readonly S[];
|
|
16
|
+
readonly capabilities?: readonly `network:${string}`[];
|
|
17
|
+
probes(ctx: Ctx<S>, input: ServiceInput): Promise<readonly Probe[]>;
|
|
18
|
+
}
|
|
19
|
+
/** A setup value; only `defineSetup` makes one. `run` answers the engine's `{ services }` ask. */
|
|
20
|
+
export interface Setup {
|
|
21
|
+
readonly [setupBrand]: true;
|
|
22
|
+
readonly secrets: readonly string[];
|
|
23
|
+
readonly capabilities: readonly `network:${string}`[];
|
|
24
|
+
run(ctx: Ctx<string>, input: unknown): Promise<Outcome>;
|
|
25
|
+
}
|
|
26
|
+
/** Defines the extension's live setup probes, which `edgar check --live`, the console and the MCP tool `setup` run against its services, with the project's services as input. The engine hides every secret in what they answer, and gives them no engine port. */
|
|
27
|
+
export declare function defineSetup<const S extends string = never>(spec: SetupSpec<S>): Setup;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { serviceInput } from "#define/service";
|
|
2
|
+
import { done, permanentFailure } from "#outcome/outcome";
|
|
3
|
+
const setupBrand = Symbol.for("edgar.sdk.setup");
|
|
4
|
+
/** A probe that passed. */
|
|
5
|
+
export const probePassed = (label) => ({ label, verdict: { kind: "pass" } });
|
|
6
|
+
/** A probe that failed: why, and the step that fixes it, such as the scope a token lacks. */
|
|
7
|
+
export const probeFailed = (label, reason, fix) => ({
|
|
8
|
+
label,
|
|
9
|
+
verdict: { kind: "fail", reason, fix },
|
|
10
|
+
});
|
|
11
|
+
/** A probe that does not apply to this project, and why, such as a webhook check on a project with no webhook. */
|
|
12
|
+
export const probeSkipped = (label, why) => ({
|
|
13
|
+
label,
|
|
14
|
+
verdict: { kind: "skipped", why },
|
|
15
|
+
});
|
|
16
|
+
/** Defines the extension's live setup probes, which `edgar check --live`, the console and the MCP tool `setup` run against its services, with the project's services as input. The engine hides every secret in what they answer, and gives them no engine port. */
|
|
17
|
+
export function defineSetup(spec) {
|
|
18
|
+
return {
|
|
19
|
+
[setupBrand]: true,
|
|
20
|
+
secrets: spec.secrets ?? [],
|
|
21
|
+
capabilities: spec.capabilities ?? [],
|
|
22
|
+
run: async (ctx, input) => {
|
|
23
|
+
const given = serviceInput(input);
|
|
24
|
+
if (given === undefined) {
|
|
25
|
+
return permanentFailure("invalid", "the engine asked for setup probes with no services");
|
|
26
|
+
}
|
|
27
|
+
return done(await spec.probes(ctx, given));
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -42,7 +42,7 @@ export type In<S extends Schema> = NonNullable<S["~standard"]["types"]>["input"]
|
|
|
42
42
|
/** Wraps a plain JSON Schema 2020-12 object; `T` is the type the author promises it describes. */
|
|
43
43
|
export declare function jsonSchema<T>(schema: Readonly<Record<string, unknown>>): Schema<T>;
|
|
44
44
|
/** The closed set of capabilities an extension may declare, within the manifest's `Capability`. */
|
|
45
|
-
export type Capability = ManifestCapability & (`network:${string}` | "sandbox:read" | "sandbox:write" | "git:push" | "tracker:read" | "tracker:write" | "runs:read" | "complete");
|
|
45
|
+
export type Capability = ManifestCapability & (`network:${string}` | "sandbox:read" | "sandbox:write" | "git:push" | "tracker:read" | "tracker:write" | "runs:read" | "complete" | "environment:docker");
|
|
46
46
|
/** Who may run a call: `never`, `once` per run, `always`, or `auto`, a function that may only tighten. */
|
|
47
47
|
export type Approval<I> = "never" | "once" | "always" | {
|
|
48
48
|
auto(input: I, ctx: Ctx<string>): Promise<ApprovalDecision>;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from "#define/identity";
|
|
|
10
10
|
export * from "#define/read-link";
|
|
11
11
|
export * from "#define/hook";
|
|
12
12
|
export * from "#define/service";
|
|
13
|
+
export * from "#define/setup";
|
|
13
14
|
export * from "#define/tool";
|
|
14
15
|
export * from "#define/tracker";
|
|
15
16
|
export * from "#outcome/end";
|
package/dist/src/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export * from "#define/identity";
|
|
|
7
7
|
export * from "#define/read-link";
|
|
8
8
|
export * from "#define/hook";
|
|
9
9
|
export * from "#define/service";
|
|
10
|
+
export * from "#define/setup";
|
|
10
11
|
export * from "#define/tool";
|
|
11
12
|
export * from "#define/tracker";
|
|
12
13
|
export * from "#outcome/end";
|
|
@@ -21,7 +21,7 @@ export interface NotePull {
|
|
|
21
21
|
readonly label: string;
|
|
22
22
|
readonly referenced?: true;
|
|
23
23
|
}
|
|
24
|
-
/** The facts of an end note as plain text that no style changed, for a medium that lays the note out by itself: the run and what it used (`took` is the time from the start of this run to its end, with each wait in it, and `tokens` is left out for a run with no model token), the address of the run's page when the console has one, each pull request that the note names, who approved it and the first 7 characters of its merge commit when people decided on it, the sentence on the merge risk, the summary and the options of the newest proposal, or the question that the run ends on when it asks a person for their call, and for a failed run its stage, its message as the engine wrote it, and that message in plain words (`why`) when it starts with a known failure word or the run's outcome has a known failure kind. A step that the engine stopped trying after too many uncharged tries also has `next`, what a person checks before a replay. */
|
|
24
|
+
/** The facts of an end note as plain text that no style changed, for a medium that lays the note out by itself: the run and what it used (`took` is the time from the start of this run to its end, with each wait in it, and `tokens` is left out for a run with no model token), the address of the run's page when the console has one, each pull request that the note names, who approved it and the first 7 characters of its merge commit when people decided on it, the sentence on the merge risk, the person a hand-back gave the card to (`handedTo`), the person who stopped a stopped run (`stoppedBy`, as the engine recorded them), the summary and the options of the newest proposal, or the question that the run ends on when it asks a person for their call or hands the card to them, and for a failed run its stage, its message as the engine wrote it, and that message in plain words (`why`) when it starts with a known failure word or the run's outcome has a known failure kind. A step that the engine stopped trying after too many uncharged tries also has `next`, what a person checks before a replay. */
|
|
25
25
|
export interface NoteFacts {
|
|
26
26
|
readonly run: string;
|
|
27
27
|
readonly took?: string;
|
|
@@ -33,6 +33,8 @@ export interface NoteFacts {
|
|
|
33
33
|
readonly approvedBy?: readonly string[];
|
|
34
34
|
readonly commit?: string;
|
|
35
35
|
readonly risk?: string;
|
|
36
|
+
readonly handedTo?: string;
|
|
37
|
+
readonly stoppedBy?: string;
|
|
36
38
|
readonly summary?: string;
|
|
37
39
|
readonly options: readonly string[];
|
|
38
40
|
readonly stage?: string;
|
|
@@ -41,9 +43,9 @@ export interface NoteFacts {
|
|
|
41
43
|
readonly next?: string;
|
|
42
44
|
readonly failedBefore: number;
|
|
43
45
|
}
|
|
44
|
-
/** What an end note says: `what` is the one thing a person must know (the run opened a pull request that waits for a review, its pull request is merged, is approved and still open, got a change request or was closed with no merge, the run needs a decision, waits on something before it can go on, failed, was stopped, is done, or is the first run of its schedule that works again), `outcome` is the run's outcome as the engine names it, `card` is the run's card, and `lines` are the note. `assignee` is the person the card is assigned to, as the card names them; when it is set, the first of `lines` is the line that names them, so a medium that can mention a person writes that line again. `repeat` marks a failed run of a schedule whose run just before it failed the same way: the note tells a person nothing new, so a sender leaves it out. `facts` are the same note as plain values. */
|
|
46
|
+
/** What an end note says: `what` is the one thing a person must know (the run opened a pull request that waits for a review, its pull request is merged, is approved and still open, got a change request or was closed with no merge, the run gave the card to a person, needs a decision, waits on something before it can go on, failed, was stopped, is done, or is the first run of its schedule that works again), `outcome` is the run's outcome as the engine names it, `card` is the run's card, and `lines` are the note. `assignee` is the person the card is assigned to, as the card names them; when it is set, the first of `lines` is the line that names them, so a medium that can mention a person writes that line again. `repeat` marks a failed run of a schedule whose run just before it failed the same way: the note tells a person nothing new, so a sender leaves it out. `facts` are the same note as plain values. */
|
|
45
47
|
export interface EndNote {
|
|
46
|
-
readonly what: "opened" | "merged" | "approved" | "changes" | "closed" | "decision" | "waits" | "failed" | "stopped" | "done" | "recovered";
|
|
48
|
+
readonly what: "opened" | "merged" | "approved" | "changes" | "closed" | "decision" | "handed" | "waits" | "failed" | "stopped" | "done" | "recovered";
|
|
47
49
|
readonly repeat: boolean;
|
|
48
50
|
readonly outcome: string;
|
|
49
51
|
readonly card: NoteCard | undefined;
|
package/dist/src/outcome/end.js
CHANGED
|
@@ -8,6 +8,8 @@ const MAX_WORDS = 25;
|
|
|
8
8
|
const MAX_DECISION_CHARS = 1200;
|
|
9
9
|
/** The question a run ends on, when no escalation or handoff already asks a person for their decision. */
|
|
10
10
|
function asked(end) {
|
|
11
|
+
if (end?.handed_to !== undefined)
|
|
12
|
+
return end.question?.trim() === "" ? undefined : end.question;
|
|
11
13
|
if (end?.decision === "escalate" || end?.decision === "handoff")
|
|
12
14
|
return undefined;
|
|
13
15
|
return end?.question?.trim() === "" ? undefined : end?.question;
|
|
@@ -74,11 +76,13 @@ const REVIEWED = {
|
|
|
74
76
|
function mergeOf(end) {
|
|
75
77
|
return reviewOf(end) === "merged" ? end?.reviewed?.commit?.slice(0, 7) : undefined;
|
|
76
78
|
}
|
|
77
|
-
/** What EDGAR did, and which of the
|
|
79
|
+
/** What EDGAR did, and which of the twelve things it is. A run that handed its card to a person says to whom and why: the question it left, else its summary. A run whose pull request people decided on says that decision, with who approved and the merge commit, and no words of the proposal, which was written before the pull request. A run whose newest proposal decides to wait is not finished: its note says what it waits on. A run that opened a pull request and then failed says both. "I opened" counts only the pull requests that the run opened; one that it only worked on or found is linked after what it did. A run with no card names its workflow, because nothing else says what it was. A step that the engine stopped trying after too many uncharged tries says why in plain words, what to check, and the replay command. A pull request whose `url` is not an `http` or `https` address is left out. The pull requests that it opened end with the review's merge risk and its reason when the risk is one word above `low`: a line that every note carries is a line that nobody reads. */
|
|
78
80
|
function didOf(run, { outcome, end }, style) {
|
|
79
81
|
const word = outcome.outcome;
|
|
80
|
-
if (outcome.kind === "cancelled")
|
|
81
|
-
|
|
82
|
+
if (outcome.kind === "cancelled") {
|
|
83
|
+
const who = end?.stopped_by === undefined ? "A person" : style.text(end.stopped_by);
|
|
84
|
+
return { what: "stopped", lines: [`${who} stopped the run before the end.`] };
|
|
85
|
+
}
|
|
82
86
|
const workflow = end?.card_url === undefined && end?.workflow !== undefined
|
|
83
87
|
? `The ${style.text(end.workflow)} workflow`
|
|
84
88
|
: undefined;
|
|
@@ -136,6 +140,14 @@ function didOf(run, { outcome, end }, style) {
|
|
|
136
140
|
if (opened.length > 0)
|
|
137
141
|
return { what: "opened", lines: [...opened, ...seen] };
|
|
138
142
|
const summary = end?.summary?.trim() === "" ? undefined : end?.summary;
|
|
143
|
+
if (end?.handed_to !== undefined) {
|
|
144
|
+
const reason = asked(end) ?? summary;
|
|
145
|
+
const to = `I handed the card to ${style.text(end.handed_to)}.`;
|
|
146
|
+
return {
|
|
147
|
+
what: "handed",
|
|
148
|
+
lines: [reason === undefined ? to : `${to} ${whole(reason, style)}`, ...seen],
|
|
149
|
+
};
|
|
150
|
+
}
|
|
139
151
|
if ((end?.decision === "escalate" || end?.decision === "handoff") && summary !== undefined)
|
|
140
152
|
return {
|
|
141
153
|
what: "decision",
|
|
@@ -247,7 +259,7 @@ function factsOf(event, { outcome, end, totals }, what, consoleUrl) {
|
|
|
247
259
|
? undefined
|
|
248
260
|
: (limit?.why ?? plainFailure(failure) ?? plainFailure(outcome.kind ?? ""));
|
|
249
261
|
const stage = end?.failure === undefined ? undefined : end.failed_stage;
|
|
250
|
-
const question = what === "decision" ? asked(end) : undefined;
|
|
262
|
+
const question = what === "decision" || what === "handed" ? asked(end) : undefined;
|
|
251
263
|
const summary = (question ?? end?.summary)?.trim() ?? "";
|
|
252
264
|
const pulls = what === "stopped" || what === "recovered" ? [] : pullsOf(end);
|
|
253
265
|
const used = (totals?.input_tokens ?? 0) + (totals?.output_tokens ?? 0);
|
|
@@ -267,6 +279,8 @@ function factsOf(event, { outcome, end, totals }, what, consoleUrl) {
|
|
|
267
279
|
...(by.length === 0 ? {} : { approvedBy: by }),
|
|
268
280
|
...(commit === undefined ? {} : { commit }),
|
|
269
281
|
...(risk === undefined ? {} : { risk }),
|
|
282
|
+
...(what === "handed" && end?.handed_to !== undefined ? { handedTo: end.handed_to } : {}),
|
|
283
|
+
...(what === "stopped" && end?.stopped_by !== undefined ? { stoppedBy: end.stopped_by } : {}),
|
|
270
284
|
...(summary === "" ? {} : { summary }),
|
|
271
285
|
options: (end?.options ?? []).map((option) => option.trim()).filter((option) => option !== ""),
|
|
272
286
|
...(what !== "failed" || stage === undefined ? {} : { stage }),
|
|
@@ -44,6 +44,10 @@ export function callables(extension) {
|
|
|
44
44
|
if (gitCredential !== undefined) {
|
|
45
45
|
table.set("git_credential", { run: async (input, ctx) => await gitCredential.run(ctx, input) });
|
|
46
46
|
}
|
|
47
|
+
const setup = extension.setup;
|
|
48
|
+
if (setup !== undefined) {
|
|
49
|
+
table.set("setup", { run: async (input, ctx) => await setup.run(ctx, input) });
|
|
50
|
+
}
|
|
47
51
|
const commitPublisher = extension.commitPublisher;
|
|
48
52
|
if (commitPublisher !== undefined) {
|
|
49
53
|
table.set("publish_commits", {
|
|
@@ -202,6 +206,8 @@ function context(call, secrets, port, signal, state) {
|
|
|
202
206
|
runs: {
|
|
203
207
|
read: async (run) => await ask("runs.read", { operation_id, run_id: run }),
|
|
204
208
|
cancel: async (origin, by, reason) => moved(await request({ kind: "runs.cancel", origin, by, reason })),
|
|
209
|
+
replay: async (run, by) => moved(await request({ kind: "runs.replay", run, by })),
|
|
210
|
+
stop: async (run, by, reason) => moved(await request({ kind: "runs.stop", run, by, reason })),
|
|
205
211
|
chat: async (text, by, origin, card, files = []) => moved(await request({
|
|
206
212
|
kind: "runs.chat",
|
|
207
213
|
text,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Ctx } from "#define/context";
|
|
2
|
-
/** A tool or service context for unit tests: fixed ids, the given secrets, config and signal, and ports that refuse all but the given `exec`, card, move, cancel, chat, inbox and picture answers. */
|
|
2
|
+
/** A tool or service context for unit tests: fixed ids, the given secrets, config and signal, and ports that refuse all but the given `exec`, card, move, cancel, replay, stop, chat, inbox and picture answers. */
|
|
3
3
|
export declare function testContext(options?: {
|
|
4
4
|
readonly config?: unknown;
|
|
5
5
|
readonly secrets?: Readonly<Record<string, string>>;
|
|
@@ -8,6 +8,8 @@ export declare function testContext(options?: {
|
|
|
8
8
|
readonly cards?: Partial<Ctx["cards"]>;
|
|
9
9
|
readonly moves?: Partial<Ctx["moves"]>;
|
|
10
10
|
readonly cancel?: Ctx["runs"]["cancel"];
|
|
11
|
+
readonly replay?: Ctx["runs"]["replay"];
|
|
12
|
+
readonly stop?: Ctx["runs"]["stop"];
|
|
11
13
|
readonly chat?: Ctx["runs"]["chat"];
|
|
12
14
|
readonly publish?: Ctx["pictures"]["publish"];
|
|
13
15
|
readonly inbox?: Partial<Ctx["inbox"]>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { err } from "#outcome/result";
|
|
2
2
|
import { SecretHolder } from "#runtime/secrets";
|
|
3
3
|
const refuse = () => Promise.resolve(err({ code: "engine_error", message: "not in this test" }));
|
|
4
|
-
/** A tool or service context for unit tests: fixed ids, the given secrets, config and signal, and ports that refuse all but the given `exec`, card, move, cancel, chat, inbox and picture answers. */
|
|
4
|
+
/** A tool or service context for unit tests: fixed ids, the given secrets, config and signal, and ports that refuse all but the given `exec`, card, move, cancel, replay, stop, chat, inbox and picture answers. */
|
|
5
5
|
export function testContext(options = {}) {
|
|
6
6
|
return {
|
|
7
7
|
operation_id: "7:remediate:1:3",
|
|
@@ -33,7 +33,13 @@ export function testContext(options = {}) {
|
|
|
33
33
|
approve: options.moves?.approve ?? refuse,
|
|
34
34
|
deny: options.moves?.deny ?? refuse,
|
|
35
35
|
},
|
|
36
|
-
runs: {
|
|
36
|
+
runs: {
|
|
37
|
+
read: refuse,
|
|
38
|
+
cancel: options.cancel ?? refuse,
|
|
39
|
+
replay: options.replay ?? refuse,
|
|
40
|
+
stop: options.stop ?? refuse,
|
|
41
|
+
chat: options.chat ?? refuse,
|
|
42
|
+
},
|
|
37
43
|
inbox: {
|
|
38
44
|
receive: options.inbox?.receive ?? refuse,
|
|
39
45
|
pending: options.inbox?.pending ?? refuse,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kana-ai/edgar-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Define EDGAR extensions: tools, a tracker, environments and hooks, and build their manifest.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"./testing": "./dist/src/testing/index.js"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@kana-ai/edgar-contracts": "0.1.
|
|
32
|
+
"@kana-ai/edgar-contracts": "0.1.5",
|
|
33
33
|
"smol-toml": "1.9.1",
|
|
34
34
|
"undici": "7.30.2"
|
|
35
35
|
},
|