Every call
A call carries protocol, call, a unique delivery id, the integration, the installation and its input. The answer repeats call and delivery and is { ok: true, output, effects? } or { ok: false, error: { code, message } }; code is refused, failed, unauthenticated or rate_limited, and message is shown to people as written. An answer of the wrong shape is refused and logged.
send.file is never retried, since a second try could send twice. When its outcome is unknown, send.find is called with the same marker; the marker is the last line of markdown (Ref <marker>), so whatever you create must keep it.
Declarative
integration-template-declarative files a capture as an issue in your tool. There is no code: each call is a request template and a response mapping in manifest.json.
| Call | Answered by | Input | Output | Limit |
|---|---|---|---|---|
connection.verify | actions.whoAmI | nothing; the connection’s site, email and api_token fill the request | { account }, shown as “Connected as …” | 10 s, no retry |
lookup | lookups.projects, issueTypes, people, labels | { lookup, query, cursor, target?, values } | { items: [{ value, label }], next } | 5 s, no retry |
send.file | item.actions.file → actions.createIssue | { target, report, markdown, outcome, values, marker } | { outcome: "issue", target, ref: { scheme: "key", key }, url } | 120 s, never retried |
send.find | item.actions.find → actions.findByMarker | { target, marker, outcome, since } | { found: true, outcome, target, ref, url } or { found: false } | 120 s, no retry |
Sandbox
integration-template-sandbox adds a capture as an entry on a page in your tool. The logic is one ES module, index.js, with no imports; each export is (input, host) => output, and host.fetch is its only way out. A thrown error with an HTTP status answers an error: 401 is unauthenticated; 403, 404 and 422 are refused; 429 is rate_limited; anything else is failed.
| Call | Answered by | Input | Output | Limit |
|---|---|---|---|---|
connection.verify | whoAmI | nothing | { account } | 10 s, no retry |
lookup (pages) | pages | { lookup, query, cursor, values } | { items: [{ value, label }], next } | 5 s, no retry |
send.file | addEntry | { target, report, markdown, outcome, values, marker } | { outcome: "entry", target, ref: { scheme: "id", id }, url } | 120 s, never retried |
send.find | findEntry | { target, marker, outcome, since } | { found: true, outcome, target, ref, url } or { found: false } | 120 s, no retry |
Remote
integration-template-remote tells your server when a capture is made or fixed and shows the facts it answers on each capture. Every call is an HTTPS POST to runtime.endpoint. event.deliver is retried, so the same event.id can arrive twice: handle it once. It declares no connection, so installing it asks nobody to sign in to your service.
| Call | Answered by | Input | Output | Limit |
|---|---|---|---|---|
event.deliver (item.made) | events.out → actions.onMade | { event: { id, type, at }, item } | {}, optionally with activity.add effects | 10 s, 6 retries |
event.deliver (item.fixed) | events.out → actions.onFixed | the same, with event.type "item.fixed" | {}, optionally with activity.add effects | 10 s, 6 retries |
zone.render (item.facts) | item.facts.render → actions.deployFacts | { zone, subject, item } | { blocks: [{ type: "fact", name, value }], ttl } | 3 s, no retry |
Security
What 1weavr enforces for every integration:
- Hosts. A request reaches only a host in
hosts, for the uses listed there; anything else is blocked before it leaves and recorded in the Log. - Secrets. A secret enters a request only through a
${secret.<name>}hole 1weavr fills, for a host that names it undersecrets, and in a body only on anauthhost. Your manifest and code never hold the value. - Masking. Secret values are masked in the Log and the developer console, in headers and bodies.
- Consent. Admins approve the permissions and hosts when they install. A version that adds a permission, host, secret, event or effect is a major version, and admins approve it before it runs.
- Publisher secrets are sealed in your integration's Environments, Test and Live apart, and never shown again once saved.
What you are responsible for:
- Ask for the least. Only the hosts, uses and permissions you need; exact hosts, never a broad wildcard.
- No real secrets in the repository. Test cases use stand-in values such as
fixture-token. - Words people read. An error message never carries a token, a URL with a key, or an internal detail.
- One send, one result. Keep the marker in what you create so
send.findfinds an earlier try. - Input is data. Capture titles, notes and addresses come from people: escape them where your tool shows them.
Report a vulnerability privately to hello@1weavr.com.
How to write the manifest and test it: Build an integration.