mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-18 05:59:42 +02:00
Compare commits
246 Commits
n8n@2.44.2
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff975f1b9e | ||
|
|
936349a9c7 | ||
|
|
842ec5b62d | ||
|
|
ec074519d9 | ||
|
|
6f3b397a1e | ||
|
|
21221adc78 | ||
|
|
532e8ef930 | ||
|
|
24621ad4ca | ||
|
|
8ee5cf1845 | ||
|
|
7f16040253 | ||
|
|
ddc97694b5 | ||
|
|
eaf47cfe39 | ||
|
|
986b82fa28 | ||
|
|
76cce99626 | ||
|
|
f34c093f08 | ||
|
|
158152496a | ||
|
|
1f223c85f8 | ||
|
|
6a015ecb18 | ||
|
|
033ec05bff | ||
|
|
dd79a610c5 | ||
|
|
a63a8edb55 | ||
|
|
f5dc06f753 | ||
|
|
b78913f75d | ||
|
|
dfec6dee81 | ||
|
|
f92b4c11d6 | ||
|
|
5120d25cbc | ||
|
|
a6719b8db7 | ||
|
|
7001886432 | ||
|
|
a906d2fdfc | ||
|
|
683fd11259 | ||
|
|
1b02863c00 | ||
|
|
d0cb582163 | ||
|
|
ea98bd0600 | ||
|
|
1405d4a351 | ||
|
|
f84413516a | ||
|
|
333a010112 | ||
|
|
b7b3d72737 | ||
|
|
5a3fc39972 | ||
|
|
d460eb28ca | ||
|
|
4a5fdd5b68 | ||
|
|
e7f0607bf1 | ||
|
|
64d8a3ad19 | ||
|
|
c70b5d49b3 | ||
|
|
c28d130c6c | ||
|
|
ca9661c091 | ||
|
|
a94f5dc8b7 | ||
|
|
fffea4c0c0 | ||
|
|
14e633d481 | ||
|
|
575eb6fa43 | ||
|
|
3ea0a3da98 | ||
|
|
fed8b1ec69 | ||
|
|
eba25caa70 | ||
|
|
fe3627914a | ||
|
|
aba5258930 | ||
|
|
aadbb7c498 | ||
|
|
8bee1eeb20 | ||
|
|
2eab299dfa | ||
|
|
fc9f9575e2 | ||
|
|
116a81e06e | ||
|
|
b36f6c0baf | ||
|
|
fa88c3e251 | ||
|
|
8120328661 | ||
|
|
1ee29b2875 | ||
|
|
f553331100 | ||
|
|
1a6b6a65d4 | ||
|
|
88a2426947 | ||
|
|
f5febab84d | ||
|
|
dde9871497 | ||
|
|
cc83b5bd77 | ||
|
|
1ea18e9ef9 | ||
|
|
1ba56b6579 | ||
|
|
baa38dbdc6 | ||
|
|
601f6ac0da | ||
|
|
e29c3a4085 | ||
|
|
447fc866bb | ||
|
|
860f1273eb | ||
|
|
deed9a2f32 | ||
|
|
a32c652c09 | ||
|
|
1903d53bc0 | ||
|
|
131e9c8679 | ||
|
|
236220b248 | ||
|
|
af0202d840 | ||
|
|
adc6d35388 | ||
|
|
b2b2a8641a | ||
|
|
952b1e73b2 | ||
|
|
f596162dc7 | ||
|
|
378847ae1e | ||
|
|
9e3b52cbbb | ||
|
|
054288e488 | ||
|
|
c839d6cd49 | ||
|
|
154cd63bbc | ||
|
|
3c447b42a7 | ||
|
|
1659fa3737 | ||
|
|
9806798e89 | ||
|
|
cdeb405948 | ||
|
|
e45a65a9bf | ||
|
|
b68bd3129b | ||
|
|
e8ded61fe1 | ||
|
|
d046047dd0 | ||
|
|
f483ebd9d1 | ||
|
|
fddef57734 | ||
|
|
ba97e46afc | ||
|
|
4cb7a6ee3d | ||
|
|
8ed8607a52 | ||
|
|
67c1981f2f | ||
|
|
a8880cb449 | ||
|
|
d411a44be0 | ||
|
|
0c0b38e3cb | ||
|
|
315e0a5377 | ||
|
|
efd4e21aad | ||
|
|
bab83634ce | ||
|
|
d6c9b9fba3 | ||
|
|
b36befcb75 | ||
|
|
ed2500ffb2 | ||
|
|
9c0b546a30 | ||
|
|
07595a0007 | ||
|
|
1e67d0315d | ||
|
|
338b0ca3fd | ||
|
|
48edbef643 | ||
|
|
5d79c16f51 | ||
|
|
40094e363b | ||
|
|
e2529a8494 | ||
|
|
50c4ced224 | ||
|
|
b7a5500d16 | ||
|
|
f6b24d0ae9 | ||
|
|
3c7dcf902d | ||
|
|
fbe743b9df | ||
|
|
f5924004ca | ||
|
|
b270d48686 | ||
|
|
3277f8c3b5 | ||
|
|
a57c8f3aba | ||
|
|
dcd312c5a9 | ||
|
|
a6d5b4de3f | ||
|
|
3968a60bf7 | ||
|
|
17fb3c0e17 | ||
|
|
b965e90307 | ||
|
|
38135e1f83 | ||
|
|
616062487a | ||
|
|
1950434a27 | ||
|
|
b3e8b7d9ce | ||
|
|
56eac665c3 | ||
|
|
8bc7161ab1 | ||
|
|
57e26feda4 | ||
|
|
9c42a76b1a | ||
|
|
ae374e79ab | ||
|
|
ef8d61bda7 | ||
|
|
caeaff7230 | ||
|
|
a3f47117cf | ||
|
|
9a524e7c21 | ||
|
|
adedbbf560 | ||
|
|
4eb63d6f41 | ||
|
|
b6d39e2d30 | ||
|
|
7920e6cf6b | ||
|
|
76c43094cd | ||
|
|
898701b05b | ||
|
|
f63111202f | ||
|
|
633eacaae6 | ||
|
|
1b0cdd5998 | ||
|
|
578eea403d | ||
|
|
7c38974070 | ||
|
|
d68ad7e97b | ||
|
|
0650b9cce0 | ||
|
|
df7b3a19c6 | ||
|
|
de42c9515d | ||
|
|
d26f914e3d | ||
|
|
8b5ea6d9e0 | ||
|
|
bfd4885026 | ||
|
|
3800bce812 | ||
|
|
aae8eb63d7 | ||
|
|
0b4c99f10d | ||
|
|
066480d8db | ||
|
|
b8780d8fee | ||
|
|
e47940eecd | ||
|
|
e3b2603d7b | ||
|
|
726a5829c8 | ||
|
|
54f1670791 | ||
|
|
b3e8634c83 | ||
|
|
1643a8598b | ||
|
|
9498088256 | ||
|
|
da3491fc87 | ||
|
|
d83f95b377 | ||
|
|
46761a60a9 | ||
|
|
ccf42e3213 | ||
|
|
94bdf85a8a | ||
|
|
29de1c63ae | ||
|
|
92f8eb51b3 | ||
|
|
146d7804af | ||
|
|
88de3cac20 | ||
|
|
04f4afe3dc | ||
|
|
6924027e93 | ||
|
|
ef183e632d | ||
|
|
ed1c1e561a | ||
|
|
a3a014422f | ||
|
|
f1fecf97e9 | ||
|
|
5da4d19e50 | ||
|
|
2019ea5593 | ||
|
|
4419fc4ba2 | ||
|
|
52aed7ac97 | ||
|
|
1d2c879fab | ||
|
|
bffe7d8392 | ||
|
|
d245b17b89 | ||
|
|
8977833ee2 | ||
|
|
acf5291d80 | ||
|
|
ebf078b64c | ||
|
|
9052f8ff3e | ||
|
|
e0fe04084e | ||
|
|
e859abaf18 | ||
|
|
a972eebe51 | ||
|
|
739c59e991 | ||
|
|
de090cb2a0 | ||
|
|
b97fe7c7d4 | ||
|
|
38e4aebfc8 | ||
|
|
d8a06666da | ||
|
|
60e0cb1e7b | ||
|
|
b09efb706c | ||
|
|
f090f53480 | ||
|
|
347385b07b | ||
|
|
bb45bca5ff | ||
|
|
3075b60576 | ||
|
|
4fcb628fca | ||
|
|
1ee379898b | ||
|
|
366ed6ed0e | ||
|
|
248c86355b | ||
|
|
e5866ac6c1 | ||
|
|
2bc3265e63 | ||
|
|
f6861fe494 | ||
|
|
632d8b9eb0 | ||
|
|
5549374241 | ||
|
|
cba16247b9 | ||
|
|
e528f948ce | ||
|
|
d3bc2754b4 | ||
|
|
ffda639b3f | ||
|
|
97e5ae56e4 | ||
|
|
bda9118168 | ||
|
|
96eff1efb9 | ||
|
|
eb66e1bde0 | ||
|
|
a8a028e2dc | ||
|
|
44c8a312c3 | ||
|
|
7bad46ee7e | ||
|
|
45eea1bc35 | ||
|
|
c8c8c3a81e | ||
|
|
e74f1c19da | ||
|
|
f16c1375b1 | ||
|
|
5146e3960f | ||
|
|
14c77900df | ||
|
|
f3e2bd83b3 |
|
|
@ -110,6 +110,7 @@ Run through this before requesting review. Each item is a real, recurring review
|
||||||
- [ ] Identifiers go through **`escape.tableName(...)` / `escape.columnName(...)`**. Never hand-write `n8n_table` prefixes. — [Always escape identifiers](#always-escape-identifiers)
|
- [ ] Identifiers go through **`escape.tableName(...)` / `escape.columnName(...)`**. Never hand-write `n8n_table` prefixes. — [Always escape identifiers](#always-escape-identifiers)
|
||||||
- [ ] **Match column type to value semantics.** Native `uuid` for UUIDs, `timestampTimezone()` for timestamps, a numeric type for numbers, `bool` for booleans, `json` for structured data. Never `varchar` as a catch-all. — [Column types](#column-types)
|
- [ ] **Match column type to value semantics.** Native `uuid` for UUIDs, `timestampTimezone()` for timestamps, a numeric type for numbers, `bool` for booleans, `json` for structured data. Never `varchar` as a catch-all. — [Column types](#column-types)
|
||||||
- [ ] **Pick the narrowest sane type within that category:** `int`/`smallint` not `bigint` when range allows; `text` not `varchar(255)` for unbounded strings; never `double` for version numbers. — [Column types](#column-types)
|
- [ ] **Pick the narrowest sane type within that category:** `int`/`smallint` not `bigint` when range allows; `text` not `varchar(255)` for unbounded strings; never `double` for version numbers. — [Column types](#column-types)
|
||||||
|
- [ ] **A generated `id` key is an integer** (`int.primary.autoGenerate2`). A UUID key is a UUIDv7. For a UUID or string key, write the reason in the PR description. A join table uses its foreign-key columns as the key, not an `id` column. — [Primary Keys](#primary-keys)
|
||||||
- [ ] **Default `notNull`**, relax only when justified. PK is implicitly NOT NULL. Migration's `notNull` matches the entity's nullability. — [NOT NULL and entity parity](#not-null-and-entity-parity)
|
- [ ] **Default `notNull`**, relax only when justified. PK is implicitly NOT NULL. Migration's `notNull` matches the entity's nullability. — [NOT NULL and entity parity](#not-null-and-entity-parity)
|
||||||
- [ ] **Enum-like columns** carry `.withEnumCheck([...])` AND `.comment('explains values')`. Opaque IDs / unix timestamps / JSON shapes also get `.comment()`. — [Constrain enum-like strings](#constrain-enum-like-strings), [Add comments on columns](#add-comments-on-columns)
|
- [ ] **Enum-like columns** carry `.withEnumCheck([...])` AND `.comment('explains values')`. Opaque IDs / unix timestamps / JSON shapes also get `.comment()`. — [Constrain enum-like strings](#constrain-enum-like-strings), [Add comments on columns](#add-comments-on-columns)
|
||||||
- [ ] **Every reference column has an explicit FK** with deliberate `onDelete`. Name FKs explicitly when SQLite recreate cycles risk duplicating them. Avoid polymorphic `(typeCol, idCol)` patterns. — [Foreign Key Constraints](#foreign-key-constraints), [General Design Guidance](#general-design-guidance)
|
- [ ] **Every reference column has an explicit FK** with deliberate `onDelete`. Name FKs explicitly when SQLite recreate cycles risk duplicating them. Avoid polymorphic `(typeCol, idCol)` patterns. — [Foreign Key Constraints](#foreign-key-constraints), [General Design Guidance](#general-design-guidance)
|
||||||
|
|
@ -439,11 +440,32 @@ Don't set the default of a `status` column to a terminal value — `"running"` m
|
||||||
|
|
||||||
### Primary Keys
|
### Primary Keys
|
||||||
|
|
||||||
Every table needs a primary key. Choose the type in this order:
|
Every table needs a primary key. **Use an integer key by default.** Read the options below in order. Use the first option that fits. Do not skip an option only because you like a later one better.
|
||||||
|
|
||||||
1. **Integer** — `column('id').int.primary.autoGenerate2`. Preferred for new tables: compact, fast joins, no ordering surprises. `autoGenerate2` uses Postgres `IDENTITY` (preferred over the deprecated `serial`-based `autoGenerate`).
|
1. **Integer (default)** — `column('id').int.primary.autoGenerate2`. Use this for every new table. Use a different option only when one of its conditions is true. Integer keys are small and make joins fast. `autoGenerate2` uses Postgres `IDENTITY`. Do not use `autoGenerate`. It uses `serial`, which is deprecated.
|
||||||
2. **UUID** — `column('id').uuid.primary`. Use when IDs are generated client-side, exposed in URLs, or need to be unguessable. Generate UUIDs in application code via `randomUUID()` from `node:crypto`; do **not** chain `.autoGenerate2` on `.uuid` (the DSL throws — `DEFAULT uuid_generate_v4()` fails on managed Postgres like Supabase because it needs the `uuid-ossp` extension in `public`). Use `.uuid` instead of `.varchar(36)`.
|
2. **UUID** — `column('id').uuid.primary`. Use this only when one of these conditions is true:
|
||||||
3. **String** — `column('id').varchar(36).primary` for IDs whose format isn't a UUID (e.g. nanoid-style IDs). Convention: nanoid length 16 for entity IDs.
|
- The application must know the ID before the insert. For example, the client makes the ID.
|
||||||
|
- The ID is in a URL or a public API. Users must not see how many rows exist or guess other IDs.
|
||||||
|
|
||||||
|
**You must use UUIDv7.** Make the ID in application code with the `uuid` package: `import { v7 as uuidv7 } from 'uuid'`.
|
||||||
|
|
||||||
|
Why: a UUIDv7 starts with a timestamp. Thus, new rows go near the end of the index. A UUIDv4 is random, for example `randomUUID()` from `node:crypto`. New rows go to random positions in the index. This splits index pages and makes the index larger.
|
||||||
|
|
||||||
|
A UUIDv7 does not give an exact creation order. Two IDs made in the same millisecond can sort in the wrong order. Clock differences between hosts can also cause this. If you need the exact order, sort by a timestamp column.
|
||||||
|
|
||||||
|
Do **not** chain `.autoGenerate2` on `.uuid`. The DSL throws an error. The database default makes a UUIDv4. Also, `uuid_generate_v4()` needs the `uuid-ossp` extension. Some managed Postgres services, such as Supabase, do not have it. Use `.uuid`, not `.varchar(36)`.
|
||||||
|
3. **String** — `column('id').varchar(36).primary`. Use this only when one of these conditions is true:
|
||||||
|
- The entity already uses IDs in a format that is not a UUID. For example, the public API or the UI already shows nanoid IDs for this entity.
|
||||||
|
- The UI shows the ID to users. A UUID is too long to read, copy, or type.
|
||||||
|
|
||||||
|
Entity IDs are usually nanoids with 16 characters.
|
||||||
|
|
||||||
|
**Give a reason for every key that is not an integer.** Write the reason in the PR description. Reviewers will ask for it. These reasons are not sufficient:
|
||||||
|
- "Other tables use string IDs."
|
||||||
|
- "This module already does it this way."
|
||||||
|
- "We might need it later."
|
||||||
|
|
||||||
|
**These options apply to a generated `id` column only.** A join table that only links other tables does not need an `id` column. Use its foreign-key columns as a composite key (see below). A foreign-key column always has the same type as the key that it refers to.
|
||||||
|
|
||||||
**Keep ID-column types consistent across related tables.** Mixing `uuid` and `varchar(36)` for what is "the same kind of ID" creates JOIN footguns.
|
**Keep ID-column types consistent across related tables.** Mixing `uuid` and `varchar(36)` for what is "the same kind of ID" creates JOIN footguns.
|
||||||
|
|
||||||
|
|
@ -696,7 +718,7 @@ If only Postgres needs the change, just put the file in `postgresdb/`; don't wri
|
||||||
|
|
||||||
### Postgres-version-aware UUID generation
|
### Postgres-version-aware UUID generation
|
||||||
|
|
||||||
`gen_random_uuid()` requires Postgres ≥ 13. n8n dropped Postgres 12 — prefer it over `uuid_generate_v4()` (which needs the `uuid-ossp` extension and breaks on managed services like Supabase). For UUID PKs, generate at the application level with `randomUUID()` — see [Primary Keys](#primary-keys).
|
`gen_random_uuid()` requires Postgres ≥ 13. n8n dropped Postgres 12 — prefer it over `uuid_generate_v4()` (which needs the `uuid-ossp` extension and breaks on managed services like Supabase). For UUID PKs, make a UUIDv7 in application code — see [Primary Keys](#primary-keys).
|
||||||
|
|
||||||
### SQLite doesn't enforce `varchar(N)` length
|
### SQLite doesn't enforce `varchar(N)` length
|
||||||
|
|
||||||
|
|
|
||||||
158
.agents/skills/env-var-docs/SKILL.md
Normal file
158
.agents/skills/env-var-docs/SKILL.md
Normal file
|
|
@ -0,0 +1,158 @@
|
||||||
|
---
|
||||||
|
name: n8n:env-var-docs
|
||||||
|
description: >-
|
||||||
|
Writes and reviews the JSDoc on `@Env(...)` config properties. The docs team
|
||||||
|
extracts these comments from source into the public environment variable
|
||||||
|
reference, so they are user documentation, not code comments. Use when adding
|
||||||
|
or changing an `@Env` property, a config class, or reviewing a PR that touches
|
||||||
|
one.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Environment variable docs
|
||||||
|
|
||||||
|
The JSDoc above every `@Env('...')` property is exported almost verbatim into
|
||||||
|
the [environment variables reference](https://docs.n8n.io/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables)
|
||||||
|
on docs.n8n.io. The generated table has four columns: variable name,
|
||||||
|
description, data type, default. Your JSDoc is the description column. The
|
||||||
|
reader is a self-hosting operator, not an n8n developer.
|
||||||
|
|
||||||
|
Follow the [n8n docs style guide](https://docs.n8n.io/contribute/contribution-guide-for-n8n-docs/style-guide-for-n8n-docs)
|
||||||
|
for these comments. It overrides the ASD-STE100 rule in `AGENTS.md` for this
|
||||||
|
one case. The rules below are the parts of that guide that matter for a
|
||||||
|
one-paragraph description.
|
||||||
|
|
||||||
|
## Rules
|
||||||
|
|
||||||
|
- **Every `@Env` property has a JSDoc.** No exceptions. A missing comment
|
||||||
|
ships as an empty description cell.
|
||||||
|
- **Write for the operator.** Say what the setting does, when to change it,
|
||||||
|
and what happens when it's unset or wrong. Don't explain why the code is
|
||||||
|
written the way it is.
|
||||||
|
- **No code references.** No file names, class names, function names,
|
||||||
|
constants, license keys, or other internals the reader can't open. Values
|
||||||
|
the operator types into the variable are fine and often needed, for example
|
||||||
|
a credential type ID like `googleOAuth2Api` or a mode like `postgresdb`.
|
||||||
|
The test: would the operator paste this into a config file, or would they
|
||||||
|
need the source to know what it means? Details for developers go in a
|
||||||
|
regular `//` comment on the implementation, not in the JSDoc.
|
||||||
|
- **No attack scenarios.** Say what the setting protects, not how an
|
||||||
|
attacker would exploit it. This is a public page.
|
||||||
|
- **Don't repeat the default.** The default renders in its own column. Don't
|
||||||
|
write "Defaults to true" or "Default: 1 hour". Do say what the unset state
|
||||||
|
means when it's not obvious, for example "When unset, n8n uses the Redis
|
||||||
|
host".
|
||||||
|
- **State units and formats.** Say "in milliseconds", "in bytes", "a
|
||||||
|
comma-separated list", "a JSON object". The data type column only says
|
||||||
|
`Number` or `String`.
|
||||||
|
- **Use allowed values when the set is small.** "One of `sqlite`,
|
||||||
|
`postgresdb`." For a list, show one inline example in the sentence.
|
||||||
|
- **No JSDoc tags.** No `@example`, `@default`, `@see`, `@deprecated`. The
|
||||||
|
exporter copies the tag name into the docs. Put the example or the
|
||||||
|
deprecation notice in a sentence instead.
|
||||||
|
- **Product names:** "Gateway credits", not "n8n Connect" or "AI Gateway".
|
||||||
|
"Publish a workflow", not "activate". `n8n` is always lowercase.
|
||||||
|
- **Style:** present tense, active voice, second person. Use contractions.
|
||||||
|
No em dashes, use a comma or a new sentence. No "e.g." or "i.e.", write
|
||||||
|
"for example" and "that is". Spell out zero to nine, numerals from 10.
|
||||||
|
Values the operator types stay numerals, for example "Set to 0".
|
||||||
|
Sentence case. One idea per sentence. End every sentence with a period.
|
||||||
|
- **Plain words:** "use" not "utilize", "lets you" not "allows you to", cut
|
||||||
|
"powerful", "seamless", "simply", "it's important to note".
|
||||||
|
- **Length:** one to three sentences. If the setting needs more, the extra
|
||||||
|
belongs in a docs page the comment can't link to yet; keep the comment to
|
||||||
|
what fits a table cell.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
Bad, as found in the generated docs:
|
||||||
|
|
||||||
|
```ts
|
||||||
|
/**
|
||||||
|
* Instance-level enablement for n8n Connect (AI Gateway). Licensed instances
|
||||||
|
* are enabled by default; false opts out. Budget / free allowance still comes
|
||||||
|
* from the license (`quota:aiGatewayBudget`).
|
||||||
|
*/
|
||||||
|
```
|
||||||
|
|
||||||
|
Wrong product name, a restated default, and an internal license key. Good:
|
||||||
|
|
||||||
|
```ts
|
||||||
|
/**
|
||||||
|
* Whether Gateway credits are available on this instance. Set to false to
|
||||||
|
* turn them off on a licensed instance. The credit allowance comes from your
|
||||||
|
* license.
|
||||||
|
*/
|
||||||
|
```
|
||||||
|
|
||||||
|
Bad:
|
||||||
|
|
||||||
|
```ts
|
||||||
|
/**
|
||||||
|
* Time to live in milliseconds for Redis cache entries. Set to 0 to disable
|
||||||
|
* expiry. Default: 1 hour.
|
||||||
|
*/
|
||||||
|
```
|
||||||
|
|
||||||
|
The default is already in the table. Good:
|
||||||
|
|
||||||
|
```ts
|
||||||
|
/**
|
||||||
|
* Time to live in milliseconds for Redis cache entries. Set to 0 to keep
|
||||||
|
* entries until Redis evicts them.
|
||||||
|
*/
|
||||||
|
```
|
||||||
|
|
||||||
|
Bad:
|
||||||
|
|
||||||
|
```ts
|
||||||
|
/**
|
||||||
|
* Comma-separated list of credential types for which overwrites are skipped
|
||||||
|
* when the credential has been customized.
|
||||||
|
* @example `N8N_SKIP_CREDENTIAL_OVERWRITE=zohoOAuth2Api,salesforceOAuth2Api`
|
||||||
|
*/
|
||||||
|
```
|
||||||
|
|
||||||
|
The `@example` tag lands in the description as literal text. Good:
|
||||||
|
|
||||||
|
```ts
|
||||||
|
/**
|
||||||
|
* Comma-separated list of credential types to skip when applying credential
|
||||||
|
* overwrites, for example `zohoOAuth2Api,salesforceOAuth2Api`. n8n skips an
|
||||||
|
* overwrite only when a user has already changed one of its fields.
|
||||||
|
*/
|
||||||
|
```
|
||||||
|
|
||||||
|
Bad:
|
||||||
|
|
||||||
|
```ts
|
||||||
|
/**
|
||||||
|
* Bind OAuth credential callbacks to the browser that initiated the flow.
|
||||||
|
* When enabled, a session-scoped `n8n-oauth-binding` cookie is set on flow
|
||||||
|
* initiation and verified on callback. Defeats phishing attacks where an
|
||||||
|
* attacker injects an OAuth authorize URL into a victim's browser to land
|
||||||
|
* tokens on the attacker's credential.
|
||||||
|
*/
|
||||||
|
```
|
||||||
|
|
||||||
|
Attack narrative and an internal cookie name on a public page. Good:
|
||||||
|
|
||||||
|
```ts
|
||||||
|
/**
|
||||||
|
* Whether an OAuth credential connection must finish in the same browser
|
||||||
|
* that started it. When enabled, n8n rejects the callback if it arrives
|
||||||
|
* from a different browser.
|
||||||
|
*/
|
||||||
|
```
|
||||||
|
|
||||||
|
## Review checklist
|
||||||
|
|
||||||
|
When you review a PR that adds or changes an `@Env` property, check each
|
||||||
|
comment against this list and quote the fix in the review:
|
||||||
|
|
||||||
|
1. JSDoc present.
|
||||||
|
2. No code identifiers, file names, or internal keys.
|
||||||
|
3. No default restated.
|
||||||
|
4. Units, format, or allowed values stated.
|
||||||
|
5. No JSDoc tags.
|
||||||
|
6. No em dashes, Latin abbreviations, or filler words.
|
||||||
|
7. Reads correctly as a sentence in a table cell with no surrounding context.
|
||||||
|
|
@ -21,8 +21,7 @@ check the code, not license to drop a team default.
|
||||||
## Non-negotiable rules
|
## Non-negotiable rules
|
||||||
|
|
||||||
- New endpoints are `@PublicApiController` classes under `v1/controllers/`, one
|
- New endpoints are `@PublicApiController` classes under `v1/controllers/`, one
|
||||||
`*.public.controller.ts` per feature. A controller is a class — never
|
`*.public.controller.ts` per feature.
|
||||||
`export =` (the legacy tuple style; `require-public-api-controller` flags it).
|
|
||||||
- Public API and internal REST are separate HTTP surfaces. A public controller
|
- Public API and internal REST are separate HTTP surfaces. A public controller
|
||||||
never calls an internal controller/endpoint; both reuse the same service.
|
never calls an internal controller/endpoint; both reuse the same service.
|
||||||
- Controllers and handlers delegate to a service — never import a repository or
|
- Controllers and handlers delegate to a service — never import a repository or
|
||||||
|
|
@ -31,7 +30,6 @@ check the code, not license to drop a team default.
|
||||||
`@ApiResponse(Dto)`.
|
`@ApiResponse(Dto)`.
|
||||||
- Register each controller via a side-effect import in `v1/controllers/index.ts`
|
- Register each controller via a side-effect import in `v1/controllers/index.ts`
|
||||||
(`public-api-controllers.test.ts` fails otherwise).
|
(`public-api-controllers.test.ts` fails otherwise).
|
||||||
- Don't add business logic to legacy `express-openapi-validator` (EOV) handlers.
|
|
||||||
- Migrating a legacy endpoint must not change its public contract.
|
- Migrating a legacy endpoint must not change its public contract.
|
||||||
|
|
||||||
These are `n8n-local-rules` ESLint rules (see `packages/cli/eslint.config.mjs`)
|
These are `n8n-local-rules` ESLint rules (see `packages/cli/eslint.config.mjs`)
|
||||||
|
|
@ -200,6 +198,5 @@ existing tests.
|
||||||
- [Test-before-save endpoints](reference.md#test-before-save-endpoints)
|
- [Test-before-save endpoints](reference.md#test-before-save-endpoints)
|
||||||
- [Errors](reference.md#errors)
|
- [Errors](reference.md#errors)
|
||||||
- [Testing matrix](reference.md#testing-matrix)
|
- [Testing matrix](reference.md#testing-matrix)
|
||||||
- [Migrating legacy EOV endpoints](reference.md#migrating-legacy-eov-endpoints)
|
|
||||||
- [Verifying a migration](reference.md#verifying-a-migration)
|
- [Verifying a migration](reference.md#verifying-a-migration)
|
||||||
- [CI and merging](reference.md#ci-and-merging)
|
- [CI and merging](reference.md#ci-and-merging)
|
||||||
|
|
|
||||||
|
|
@ -122,11 +122,10 @@ app-wide `bodyParser` before the registry sees it. Declaring
|
||||||
- An unknown field (one the DTO doesn't declare, on a `{ strict: true }` DTO)
|
- An unknown field (one the DTO doesn't declare, on a `{ strict: true }` DTO)
|
||||||
fails with `Unexpected form field "<name>"` — not the default "unrecognized
|
fails with `Unexpected form field "<name>"` — not the default "unrecognized
|
||||||
keys" wording.
|
keys" wording.
|
||||||
- Multer's own parsing errors map to the same statuses express-openapi-validator
|
- Multer parsing errors map to these statuses: `413` for a size or count limit,
|
||||||
used: `413` for a size/count limit, `400` for any other multer error, `500`
|
`500` for `LIMIT_UNEXPECTED_FILE`, `400` for any other multer error, and `500`
|
||||||
— unmasked, since this is a `ResponseError` — for anything else (a
|
for anything else (a malformed body). The `500` is not masked, because it is a
|
||||||
malformed body; a missing boundary gives `400` with `multipart file(s)
|
`ResponseError`. A missing boundary gives `400` with `multipart file(s) required`.
|
||||||
required`).
|
|
||||||
- The body is parsed **after** every auth/scope/license/quota gate and
|
- The body is parsed **after** every auth/scope/license/quota gate and
|
||||||
**before** controller/route middlewares — a caller those gates would reject
|
**before** controller/route middlewares — a caller those gates would reject
|
||||||
never has their (possibly huge) body read off the socket, and a middleware
|
never has their (possibly huge) body read off the socket, and a middleware
|
||||||
|
|
@ -175,58 +174,6 @@ example an `application/gzip` stream. The framework treats options whose
|
||||||
The runtime part is `sendBinaryResponse` in
|
The runtime part is `sendBinaryResponse` in
|
||||||
`packages/cli/src/public-api/media-types/binary-response.ts`.
|
`packages/cli/src/public-api/media-types/binary-response.ts`.
|
||||||
|
|
||||||
## Migrating legacy EOV endpoints
|
|
||||||
|
|
||||||
Legacy `express-openapi-validator` endpoints live under
|
|
||||||
`v1/handlers/`, wired through `openapi.yml` with `x-eov-operation-*` and request
|
|
||||||
types in `packages/cli/src/public-api/types.ts`. Treat these as migration targets,
|
|
||||||
not templates.
|
|
||||||
|
|
||||||
- Prefer migrating to `@PublicApiController` over extending the handler.
|
|
||||||
- Preserve the public contract: path, method, scopes, status codes, response
|
|
||||||
shape, and pagination.
|
|
||||||
- Move HTTP concerns into the controller and business orchestration into the
|
|
||||||
shared service; keep the controller a thin HTTP boundary. If the legacy
|
|
||||||
handler was itself already just a thin wrapper around an internal
|
|
||||||
`@RestController` (calling its methods directly, e.g.
|
|
||||||
`Container.get(SomeController).createThing(req, res, payload)`), the new
|
|
||||||
public controller can call that same internal controller directly — no need
|
|
||||||
to duplicate its validation/business logic.
|
|
||||||
- A route must be served by either the EOV handler or a controller, not both —
|
|
||||||
the build's `mergeDecoratorDocument` (`v1/openapi-gen/generate.ts`) throws on
|
|
||||||
a path+method declared by both sides. Remove the legacy wiring (its path's
|
|
||||||
`$ref` entry in `openapi.yml`, the `x-eov-operation-*` handler, and its
|
|
||||||
`handler.ts`) only after the new controller is registered, `pnpm build`
|
|
||||||
regenerates the spec cleanly, and tests are updated.
|
|
||||||
- Fully delete the migrated legacy files: the handler's `.ts`, its
|
|
||||||
`spec/paths/*.yml` and `spec/schemas/*.yml`, and any now-dead request type
|
|
||||||
in `packages/cli/src/public-api/types.ts`. Then check
|
|
||||||
`v1/shared/spec/schemas/_index.yml` and `v1/shared/spec/parameters/_index.yml`
|
|
||||||
for entries that `$ref` one of the deleted schema/parameter files — those are
|
|
||||||
separate from the path's own `$ref` in `openapi.yml` and are easy to miss;
|
|
||||||
left dangling, the next bundle fails on a broken `$ref`.
|
|
||||||
- If the legacy handler gated on a license (`isLicensed('feat:x')` middleware),
|
|
||||||
`@Licensed('feat:x')` now replicates that for a controller route (see the
|
|
||||||
decorator table in [SKILL.md](SKILL.md#declaring-a-controller)) — but only for
|
|
||||||
a single feature. If the legacy check was an any-of/all-of over several flags
|
|
||||||
(e.g. `LicenseState.isProvisioningLicensed()`), `@Licensed` can't express
|
|
||||||
that; replicate it manually in the controller instead, don't drop it - this
|
|
||||||
is exactly what the internal `provisioning.controller.ee.ts` and
|
|
||||||
`role-mapping-rule.controller.ee.ts` already do, since neither uses
|
|
||||||
`@Licensed` for that reason.
|
|
||||||
- As a legacy file drops repository access / the `export =` tuple, remove its
|
|
||||||
entry from the `off` allowlists for `no-repository-in-public-api-handler` and
|
|
||||||
`require-public-api-controller` in `packages/cli/eslint.config.mjs` (shrink-only
|
|
||||||
— never extend them).
|
|
||||||
- A `multipart/form-data` legacy endpoint migrates onto `@Body({ mediaType:
|
|
||||||
'multipart/form-data', uploadLimits })` — see
|
|
||||||
[Request body media types](#request-body-media-types). For any other
|
|
||||||
non-standard endpoint, study the nearest existing handler first.
|
|
||||||
- Keep each field in its original position when you extract a request shape shared
|
|
||||||
by two routes, and destructure out the ones a route doesn't take. The generator
|
|
||||||
emits properties in shape order, so a moved field rewrites the `*.generated.yml`
|
|
||||||
of a route the PR wasn't changing.
|
|
||||||
|
|
||||||
## Verifying a migration
|
## Verifying a migration
|
||||||
|
|
||||||
Tests are written against the new code, so they can't show that the old behavior
|
Tests are written against the new code, so they can't show that the old behavior
|
||||||
|
|
|
||||||
1
.claude/plugins/n8n/skills/env-var-docs
Symbolic link
1
.claude/plugins/n8n/skills/env-var-docs
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../../../../.agents/skills/env-var-docs
|
||||||
1
.github/CI-TELEMETRY.md
vendored
1
.github/CI-TELEMETRY.md
vendored
|
|
@ -85,6 +85,7 @@ return 'blacksmith';
|
||||||
| Accessibility buckets | `packages/quality/testing/playwright/reporters/a11y-reporter.ts` | Per-bucket axe score, violated rules, violating elements |
|
| Accessibility buckets | `packages/quality/testing/playwright/reporters/a11y-reporter.ts` | Per-bucket axe score, violated rules, violating elements |
|
||||||
| Build stats | `.github/scripts/send-build-stats.mjs` | Per-package build duration, cache hit/miss, run total |
|
| Build stats | `.github/scripts/send-build-stats.mjs` | Per-package build duration, cache hit/miss, run total |
|
||||||
| Docker stats | `.github/scripts/send-docker-stats.mjs` | Image size per platform, docker build duration |
|
| Docker stats | `.github/scripts/send-docker-stats.mjs` | Image size per platform, docker build duration |
|
||||||
|
| Dive image efficiency | `packages/quality/efficiency/images/image-efficiency.spec.ts` | Layer content size, estimated waste, efficiency score, and layer count through the shared Playwright reporter |
|
||||||
| Container stack | `packages/quality/environments/containers/telemetry.ts` | E2E stack startup times per service |
|
| Container stack | `packages/quality/environments/containers/telemetry.ts` | E2E stack startup times per service |
|
||||||
|
|
||||||
## Secrets
|
## Secrets
|
||||||
|
|
|
||||||
4
.github/WORKFLOWS.md
vendored
4
.github/WORKFLOWS.md
vendored
|
|
@ -411,6 +411,7 @@ Run-workflow dropdown, which only a user with write access can pick.
|
||||||
|-----------------------------|---------------------------------------------------------|
|
|-----------------------------|---------------------------------------------------------|
|
||||||
| `util-codespace-preview.yml`| Wake, re-serve or delete a PR preview instance by hand |
|
| `util-codespace-preview.yml`| Wake, re-serve or delete a PR preview instance by hand |
|
||||||
| `util-data-tooling.yml` | SQLite/PostgreSQL export/import validation (manual) |
|
| `util-data-tooling.yml` | SQLite/PostgreSQL export/import validation (manual) |
|
||||||
|
| `test-image-efficiency.yml` | Measure n8n and runners image size and layer waste with Dive |
|
||||||
| `util-probe-registry.yml` | Diagnose slow npm metadata fetches (temporary) |
|
| `util-probe-registry.yml` | Diagnose slow npm metadata fetches (temporary) |
|
||||||
| `sec-sync-bundle-branches.yml` | Sync both bundle branches on demand, including before a bundle cut |
|
| `sec-sync-bundle-branches.yml` | Sync both bundle branches on demand, including before a bundle cut |
|
||||||
|
|
||||||
|
|
@ -586,7 +587,7 @@ Push to master
|
||||||
| Daily 03:00 | `sec-sync-bundle-branches.yml` | Merge the base into `bundle/*` |
|
| Daily 03:00 | `sec-sync-bundle-branches.yml` | Merge the base into `bundle/*` |
|
||||||
| Daily 00:00 | `docker-build-push.yml` | Nightly Docker images |
|
| Daily 00:00 | `docker-build-push.yml` | Nightly Docker images |
|
||||||
| Daily 00:00 | `test-db.yml` | Database compatibility |
|
| Daily 00:00 | `test-db.yml` | Database compatibility |
|
||||||
| Daily 00:00 | `test-e2e-performance-reusable.yml`| Performance E2E |
|
| Daily 00:00 | `test-e2e-performance-reusable.yml`| Browser performance and idle memory baselines |
|
||||||
| Daily 00:00 | `release-storybook.yml` | Storybook deploy |
|
| Daily 00:00 | `release-storybook.yml` | Storybook deploy |
|
||||||
| Daily 00:00 | `release-chromatic.yml` | Visual regression |
|
| Daily 00:00 | `release-chromatic.yml` | Visual regression |
|
||||||
| Daily 00:00 | `util-check-docs-urls.yml` | Doc link validation |
|
| Daily 00:00 | `util-check-docs-urls.yml` | Doc link validation |
|
||||||
|
|
@ -599,6 +600,7 @@ Push to master
|
||||||
| Daily 08:00 | `build-v3-nightly.yml` | Nightly v3 Docker images |
|
| Daily 08:00 | `build-v3-nightly.yml` | Nightly v3 Docker images |
|
||||||
| Monday 00:00 | `util-update-node-popularity.yml` | Node usage stats |
|
| Monday 00:00 | `util-update-node-popularity.yml` | Node usage stats |
|
||||||
| Monday 02:00 | `test-e2e-coverage-weekly.yml` | Weekly E2E coverage |
|
| Monday 02:00 | `test-e2e-coverage-weekly.yml` | Weekly E2E coverage |
|
||||||
|
| Wednesday 04:00 | `util-update-get-n8n-versions.yml` | get-n8n stable versions |
|
||||||
| Saturday 22:00 | `test-evals-ai.yml` | AI workflow evals |
|
| Saturday 22:00 | `test-evals-ai.yml` | AI workflow evals |
|
||||||
| 1st of month 04:00 | `util-refresh-cubic-schema.yml` | Refresh vendored cubic schema |
|
| 1st of month 04:00 | `util-refresh-cubic-schema.yml` | Refresh vendored cubic schema |
|
||||||
|
|
||||||
|
|
|
||||||
8
.github/scripts/pnpm-lock.yaml
vendored
8
.github/scripts/pnpm-lock.yaml
vendored
|
|
@ -747,8 +747,8 @@ packages:
|
||||||
fast-deep-equal@3.1.3:
|
fast-deep-equal@3.1.3:
|
||||||
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
|
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
|
||||||
|
|
||||||
fast-uri@3.1.5:
|
fast-uri@3.1.8:
|
||||||
resolution: {integrity: sha512-gHwA1O9LDIcKunMKhObS/HimwtehO1nPUECKAu5TpKgaO19fcWEl4bliWe1jWxVFvIXztJjjQ4L8XQ1EU9f7Jw==}
|
resolution: {integrity: sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==}
|
||||||
|
|
||||||
fd-package-json@2.0.0:
|
fd-package-json@2.0.0:
|
||||||
resolution: {integrity: sha512-jKmm9YtsNXN789RS/0mSzOC1NUq9mkVd65vbSSVsKdjGvYXBuE4oWe2QOEoFeRmJg+lPuZxpmrfFclNhoRMneQ==}
|
resolution: {integrity: sha512-jKmm9YtsNXN789RS/0mSzOC1NUq9mkVd65vbSSVsKdjGvYXBuE4oWe2QOEoFeRmJg+lPuZxpmrfFclNhoRMneQ==}
|
||||||
|
|
@ -1694,7 +1694,7 @@ snapshots:
|
||||||
ajv@8.20.0:
|
ajv@8.20.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
fast-deep-equal: 3.1.3
|
fast-deep-equal: 3.1.3
|
||||||
fast-uri: 3.1.5
|
fast-uri: 3.1.8
|
||||||
json-schema-traverse: 1.0.0
|
json-schema-traverse: 1.0.0
|
||||||
require-from-string: 2.0.2
|
require-from-string: 2.0.2
|
||||||
|
|
||||||
|
|
@ -1994,7 +1994,7 @@ snapshots:
|
||||||
|
|
||||||
fast-deep-equal@3.1.3: {}
|
fast-deep-equal@3.1.3: {}
|
||||||
|
|
||||||
fast-uri@3.1.5: {}
|
fast-uri@3.1.8: {}
|
||||||
|
|
||||||
fd-package-json@2.0.0:
|
fd-package-json@2.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
|
||||||
2
.github/test-metrics/e2e-impact-map.json
vendored
2
.github/test-metrics/e2e-impact-map.json
vendored
File diff suppressed because one or more lines are too long
8
.github/workflows/ci-pull-requests.yml
vendored
8
.github/workflows/ci-pull-requests.yml
vendored
|
|
@ -80,6 +80,7 @@ jobs:
|
||||||
!**/*.test.ts
|
!**/*.test.ts
|
||||||
!**/*.spec.ts
|
!**/*.spec.ts
|
||||||
!packages/quality/testing/playwright/**
|
!packages/quality/testing/playwright/**
|
||||||
|
!packages/quality/efficiency/**
|
||||||
!packages/frontend/@n8n/storybook/**
|
!packages/frontend/@n8n/storybook/**
|
||||||
!.devcontainer/**
|
!.devcontainer/**
|
||||||
!scripts/agent-setup.mjs
|
!scripts/agent-setup.mjs
|
||||||
|
|
@ -146,10 +147,17 @@ jobs:
|
||||||
cubic.yaml
|
cubic.yaml
|
||||||
.agents/review-rules/**
|
.agents/review-rules/**
|
||||||
e2e-performance:
|
e2e-performance:
|
||||||
|
packages/quality/efficiency/memory/idle/**
|
||||||
|
packages/quality/efficiency/playwright.config.ts
|
||||||
|
packages/quality/efficiency/package.json
|
||||||
|
packages/quality/testing/playwright/package.json
|
||||||
|
packages/quality/testing/playwright/quality-*.ts
|
||||||
|
packages/quality/testing/playwright/fixtures/**
|
||||||
packages/quality/testing/playwright/tests/performance/**
|
packages/quality/testing/playwright/tests/performance/**
|
||||||
packages/quality/testing/playwright/utils/performance-helper.ts
|
packages/quality/testing/playwright/utils/performance-helper.ts
|
||||||
packages/quality/environments/containers/**
|
packages/quality/environments/containers/**
|
||||||
.github/workflows/test-e2e-performance-reusable.yml
|
.github/workflows/test-e2e-performance-reusable.yml
|
||||||
|
.github/workflows/test-e2e-reusable.yml
|
||||||
# Whole directories, not the `engine-*` files alone. Engine v2
|
# Whole directories, not the `engine-*` files alone. Engine v2
|
||||||
# routing lives in ordinary control plane code: `workflow-runner.ts`
|
# routing lives in ordinary control plane code: `workflow-runner.ts`
|
||||||
# and the webhook and trigger paths decide whether a run reaches the
|
# and the webhook and trigger paths decide whether a run reaches the
|
||||||
|
|
|
||||||
10
.github/workflows/prepare-docker-reusable.yml
vendored
10
.github/workflows/prepare-docker-reusable.yml
vendored
|
|
@ -9,6 +9,16 @@ name: 'Prepare n8n Docker (reusable)'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
secrets:
|
||||||
|
QA_METRICS_WEBHOOK_URL:
|
||||||
|
description: 'QA metrics webhook URL.'
|
||||||
|
required: false
|
||||||
|
QA_METRICS_WEBHOOK_USER:
|
||||||
|
description: 'QA metrics webhook username.'
|
||||||
|
required: false
|
||||||
|
QA_METRICS_WEBHOOK_PASSWORD:
|
||||||
|
description: 'QA metrics webhook password.'
|
||||||
|
required: false
|
||||||
inputs:
|
inputs:
|
||||||
build-variant:
|
build-variant:
|
||||||
description: 'standard, coverage, or pc'
|
description: 'standard, coverage, or pc'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
name: 'Test: E2E Performance'
|
name: 'Test: E2E Performance'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
@ -24,6 +27,17 @@ jobs:
|
||||||
artifact-prefix: performance
|
artifact-prefix: performance
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
|
idle-memory-baselines:
|
||||||
|
needs: [prepare-docker]
|
||||||
|
uses: ./.github/workflows/test-e2e-reusable.yml
|
||||||
|
with:
|
||||||
|
test-mode: docker-artifact
|
||||||
|
test-command: pnpm --filter=@n8n/efficiency test:memory
|
||||||
|
workers: '1'
|
||||||
|
currents-project-id: 'O9BJaN'
|
||||||
|
artifact-prefix: memory-performance
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
canvas-perf-sentinels:
|
canvas-perf-sentinels:
|
||||||
name: Canvas Perf Sentinels
|
name: Canvas Perf Sentinels
|
||||||
# Sentinels are nightly only — wall-clock browser perf has 15-30% variance,
|
# Sentinels are nightly only — wall-clock browser perf has 15-30% variance,
|
||||||
|
|
|
||||||
7
.github/workflows/test-e2e-reusable.yml
vendored
7
.github/workflows/test-e2e-reusable.yml
vendored
|
|
@ -195,9 +195,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifact-prefix }}-shard-${{ matrix.shard }}
|
name: ${{ inputs.artifact-prefix }}-shard-${{ matrix.shard }}
|
||||||
path: |
|
path: |
|
||||||
packages/quality/testing/playwright/test-results/
|
packages/quality/*/test-results*
|
||||||
packages/quality/testing/playwright/test-results.json
|
packages/quality/*/playwright-report/
|
||||||
packages/quality/testing/playwright/playwright-report/
|
packages/quality/*/*/test-results*
|
||||||
|
packages/quality/*/*/playwright-report/
|
||||||
packages/quality/testing/playwright/coverage/lcov.info
|
packages/quality/testing/playwright/coverage/lcov.info
|
||||||
packages/quality/testing/playwright/coverage/by-spec/
|
packages/quality/testing/playwright/coverage/by-spec/
|
||||||
packages/quality/testing/playwright/coverage/index.html
|
packages/quality/testing/playwright/coverage/index.html
|
||||||
|
|
|
||||||
71
.github/workflows/test-image-efficiency.yml
vendored
Normal file
71
.github/workflows/test-image-efficiency.yml
vendored
Normal file
|
|
@ -0,0 +1,71 @@
|
||||||
|
name: 'Test: Image Efficiency'
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
prepare-docker:
|
||||||
|
uses: ./.github/workflows/prepare-docker-reusable.yml
|
||||||
|
secrets:
|
||||||
|
QA_METRICS_WEBHOOK_URL: ${{ secrets.QA_METRICS_WEBHOOK_URL }}
|
||||||
|
QA_METRICS_WEBHOOK_USER: ${{ secrets.QA_METRICS_WEBHOOK_USER }}
|
||||||
|
QA_METRICS_WEBHOOK_PASSWORD: ${{ secrets.QA_METRICS_WEBHOOK_PASSWORD }}
|
||||||
|
|
||||||
|
image-efficiency:
|
||||||
|
name: Image Efficiency
|
||||||
|
needs: prepare-docker
|
||||||
|
runs-on: ${{ vars.RUNNER_PROVIDER == 'github' && 'ubuntu-latest' || 'blacksmith-2vcpu-ubuntu-2204' }}
|
||||||
|
timeout-minutes: 20
|
||||||
|
env:
|
||||||
|
CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }}
|
||||||
|
CURRENTS_PROJECT_ID: 'nHHLA5'
|
||||||
|
CURRENTS_CI_BUILD_ID: ${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt }}-images
|
||||||
|
QA_METRICS_WEBHOOK_URL: ${{ secrets.QA_METRICS_WEBHOOK_URL }}
|
||||||
|
QA_METRICS_WEBHOOK_USER: ${{ secrets.QA_METRICS_WEBHOOK_USER }}
|
||||||
|
QA_METRICS_WEBHOOK_PASSWORD: ${{ secrets.QA_METRICS_WEBHOOK_PASSWORD }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: useblacksmith/checkout@bcec731f1eb1367240608d1c889a75b96db6ec53 # v1.5.0
|
||||||
|
|
||||||
|
- name: Setup Environment
|
||||||
|
uses: ./.github/actions/setup-nodejs
|
||||||
|
with:
|
||||||
|
build-command: pnpm turbo run build --filter=@n8n/utils...
|
||||||
|
|
||||||
|
- name: Load images from cache
|
||||||
|
uses: ./.github/actions/load-n8n-docker
|
||||||
|
|
||||||
|
- name: Install Dive
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
# Keep this version in sync with efficiency/images/dive-results.ts.
|
||||||
|
VERSION=0.13.1
|
||||||
|
DIR=$(mktemp -d "$RUNNER_TEMP/dive.XXXXXX")
|
||||||
|
ARCHIVE="$DIR/dive.tar.gz"
|
||||||
|
curl --fail --location --retry 3 \
|
||||||
|
"https://github.com/wagoodman/dive/releases/download/v${VERSION}/dive_${VERSION}_linux_amd64.tar.gz" \
|
||||||
|
--output "$ARCHIVE"
|
||||||
|
echo "0970549eb4a306f8825a84145a2534153badb4d7dcf3febd1967c706367c3d0e $ARCHIVE" | sha256sum --check
|
||||||
|
tar -xzf "$ARCHIVE" -C "$DIR" dive
|
||||||
|
echo "$DIR" >> "$GITHUB_PATH"
|
||||||
|
|
||||||
|
- name: Measure image layer efficiency
|
||||||
|
run: >-
|
||||||
|
pnpm --filter=@n8n/efficiency exec playwright test
|
||||||
|
--project=image-efficiency:n8n --project=image-efficiency:runners
|
||||||
|
|
||||||
|
- name: Upload image efficiency reports
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||||
|
with:
|
||||||
|
name: image-efficiency-${{ github.run_attempt }}
|
||||||
|
path: |
|
||||||
|
packages/quality/efficiency/test-results/
|
||||||
|
packages/quality/efficiency/test-results.json
|
||||||
|
packages/quality/efficiency/playwright-report/
|
||||||
|
retention-days: 7
|
||||||
|
if-no-files-found: ignore
|
||||||
118
.github/workflows/util-update-get-n8n-versions.yml
vendored
Normal file
118
.github/workflows/util-update-get-n8n-versions.yml
vendored
Normal file
|
|
@ -0,0 +1,118 @@
|
||||||
|
name: 'Util: Update get-n8n Versions'
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
# Run every Wednesday at 04:00 UTC.
|
||||||
|
- cron: '0 4 * * 3'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: update-get-n8n-versions
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-versions:
|
||||||
|
name: Update get-n8n versions
|
||||||
|
if: >-
|
||||||
|
github.ref_name == github.event.repository.default_branch &&
|
||||||
|
(github.event_name == 'workflow_dispatch' ||
|
||||||
|
(github.event_name == 'schedule' && github.repository == 'n8n-io/n8n'))
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 25
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- name: Generate GitHub App Token
|
||||||
|
id: generate-token
|
||||||
|
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
|
||||||
|
with:
|
||||||
|
app-id: ${{ secrets.N8N_ASSISTANT_APP_ID }}
|
||||||
|
private-key: ${{ secrets.N8N_ASSISTANT_PRIVATE_KEY }}
|
||||||
|
permission-contents: write
|
||||||
|
permission-pull-requests: write
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Resolve stable versions
|
||||||
|
id: versions
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||||
|
run: |
|
||||||
|
n8n_version="$(gh api repos/n8n-io/n8n/releases/latest --jq '.tag_name | sub("^n8n@"; "")')"
|
||||||
|
|
||||||
|
registry_token="$(curl -fsSL --retry 3 'https://ghcr.io/token?scope=repository:n8n-io/n8n-sandbox-service-api:pull' | jq -er '.token')"
|
||||||
|
stable_digest="$(docker buildx imagetools inspect \
|
||||||
|
'ghcr.io/n8n-io/n8n-sandbox-service-api:stable' \
|
||||||
|
--format '{{json .Manifest}}' | jq -er '.digest')"
|
||||||
|
sandbox_version=''
|
||||||
|
while IFS= read -r version; do
|
||||||
|
version_digest="$(docker buildx imagetools inspect \
|
||||||
|
"ghcr.io/n8n-io/n8n-sandbox-service-api:${version}" \
|
||||||
|
--format '{{json .Manifest}}' | jq -er '.digest')"
|
||||||
|
if [ "$version_digest" = "$stable_digest" ]; then
|
||||||
|
sandbox_version="$version"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done < <(curl -fsSL --retry 3 \
|
||||||
|
-H "Authorization: Bearer $registry_token" \
|
||||||
|
'https://ghcr.io/v2/n8n-io/n8n-sandbox-service-api/tags/list?n=1000' |
|
||||||
|
jq -r '.tags[]' |
|
||||||
|
grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' |
|
||||||
|
sort -Vr)
|
||||||
|
|
||||||
|
printf '%s\n' "$n8n_version" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$'
|
||||||
|
printf '%s\n' "$sandbox_version" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$'
|
||||||
|
|
||||||
|
for image in api runner-dind sandbox; do
|
||||||
|
docker manifest inspect "ghcr.io/n8n-io/n8n-sandbox-service-${image}:${sandbox_version}" >/dev/null
|
||||||
|
done
|
||||||
|
|
||||||
|
sed -i "s/^FALLBACK_N8N_VERSION=.*/FALLBACK_N8N_VERSION=\"${n8n_version}\"/" docker/get-n8n.sh
|
||||||
|
sed -i "s/^SANDBOX_VERSION=.*/SANDBOX_VERSION=\"${sandbox_version}\"/" docker/get-n8n.sh
|
||||||
|
|
||||||
|
echo "n8n_version=$n8n_version" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "sandbox_version=$sandbox_version" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Check for changes
|
||||||
|
id: changes
|
||||||
|
run: |
|
||||||
|
if git diff --quiet -- docker/get-n8n.sh; then
|
||||||
|
echo 'has-changes=false' >> "$GITHUB_OUTPUT"
|
||||||
|
else
|
||||||
|
echo 'has-changes=true' >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Test installer upgrade
|
||||||
|
if: steps.changes.outputs.has-changes == 'true'
|
||||||
|
run: |
|
||||||
|
shellcheck docker/get-n8n.sh docker/test-get-n8n.sh
|
||||||
|
dash -n docker/get-n8n.sh
|
||||||
|
dash -n docker/test-get-n8n.sh
|
||||||
|
sh docker/test-get-n8n.sh --e2e
|
||||||
|
|
||||||
|
- name: Create pull request
|
||||||
|
if: steps.changes.outputs.has-changes == 'true'
|
||||||
|
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
|
||||||
|
with:
|
||||||
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
|
add-paths: docker/get-n8n.sh
|
||||||
|
commit-message: 'chore: Update get-n8n fallback versions'
|
||||||
|
labels: 'automation:scheduled-update'
|
||||||
|
title: 'chore: Update get-n8n fallback versions'
|
||||||
|
body: |
|
||||||
|
This automated PR updates the get-n8n fallback release to ${{ steps.versions.outputs.n8n_version }}.
|
||||||
|
It also updates the sandbox service release to ${{ steps.versions.outputs.sandbox_version }}.
|
||||||
|
|
||||||
|
The workflow verified that all sandbox images use the same release. It also upgraded a legacy installation to these versions and checked the running stack.
|
||||||
|
|
||||||
|
_Generated by the weekly get-n8n version update workflow._
|
||||||
|
branch: update-get-n8n-versions
|
||||||
|
base: master
|
||||||
|
delete-branch: true
|
||||||
|
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
||||||
|
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
||||||
|
|
@ -14,6 +14,11 @@ frontend, and extensible node-based workflow engine.
|
||||||
- Write all technical text (code comments, PR descriptions, issue and ticket
|
- Write all technical text (code comments, PR descriptions, issue and ticket
|
||||||
descriptions, docs) in ASD-STE100 Simplified Technical English: use short
|
descriptions, docs) in ASD-STE100 Simplified Technical English: use short
|
||||||
sentences, the active voice, and one instruction for each sentence
|
sentences, the active voice, and one instruction for each sentence
|
||||||
|
- **JSDoc on `@Env(...)` config properties is public documentation.** The
|
||||||
|
docs team exports these comments into the environment variable reference on
|
||||||
|
docs.n8n.io. Write them for a self-hosting operator and follow the
|
||||||
|
`n8n:env-var-docs` skill, which applies the n8n docs style guide and
|
||||||
|
overrides the ASD-STE100 rule above for these comments
|
||||||
- **Secrets on the command line:** if a developer opted into anonymous dev
|
- **Secrets on the command line:** if a developer opted into anonymous dev
|
||||||
metrics (`scripts/dev-metrics`), pnpm command arguments are recorded. Arguments
|
metrics (`scripts/dev-metrics`), pnpm command arguments are recorded. Arguments
|
||||||
of secret-carrying words (`config`, `login`, `publish`, `token`) — whether a
|
of secret-carrying words (`config`, `login`, `publish`, `token`) — whether a
|
||||||
|
|
|
||||||
45
OWNERS
45
OWNERS
|
|
@ -30,6 +30,7 @@ packages/@n8n/backend-network/ @n8n-io/catalysts
|
||||||
packages/@n8n/backend-services/ @n8n-io/catalysts
|
packages/@n8n/backend-services/ @n8n-io/catalysts
|
||||||
packages/@n8n/backend-services/src/services/role.service.ts @n8n-io/iam
|
packages/@n8n/backend-services/src/services/role.service.ts @n8n-io/iam
|
||||||
packages/@n8n/backend-services/src/services/role-cache.service.ts @n8n-io/iam
|
packages/@n8n/backend-services/src/services/role-cache.service.ts @n8n-io/iam
|
||||||
|
packages/@n8n/backend-services/src/services/jwt.service.ts @n8n-io/iam
|
||||||
packages/@n8n/backend-test-utils/ @n8n-io/catalysts
|
packages/@n8n/backend-test-utils/ @n8n-io/catalysts
|
||||||
packages/@n8n/di/ @n8n-io/catalysts
|
packages/@n8n/di/ @n8n-io/catalysts
|
||||||
packages/@n8n/errors/ @n8n-io/catalysts
|
packages/@n8n/errors/ @n8n-io/catalysts
|
||||||
|
|
@ -84,7 +85,6 @@ packages/cli/src/security-audit/ @n8n-io/catalysts
|
||||||
packages/cli/src/modules/workflow-index/ @n8n-io/catalysts
|
packages/cli/src/modules/workflow-index/ @n8n-io/catalysts
|
||||||
packages/cli/src/modules/breaking-changes/ @n8n-io/catalysts
|
packages/cli/src/modules/breaking-changes/ @n8n-io/catalysts
|
||||||
packages/cli/src/workflows/publication/ @n8n-io/catalysts required
|
packages/cli/src/workflows/publication/ @n8n-io/catalysts required
|
||||||
packages/cli/src/modules/otel/ @n8n-io/ligo
|
|
||||||
|
|
||||||
packages/cli/src/auth/ @n8n-io/iam
|
packages/cli/src/auth/ @n8n-io/iam
|
||||||
packages/cli/src/credentials/ @n8n-io/iam
|
packages/cli/src/credentials/ @n8n-io/iam
|
||||||
|
|
@ -115,14 +115,15 @@ packages/cli/src/binary-data/ @n8n-io/catalysts
|
||||||
packages/cli/src/posthog/ @n8n-io/growth
|
packages/cli/src/posthog/ @n8n-io/growth
|
||||||
packages/cli/src/modules/data-table/ @n8n-io/knowledge
|
packages/cli/src/modules/data-table/ @n8n-io/knowledge
|
||||||
|
|
||||||
packages/cli/src/evaluation.ee/ @n8n-io/ai
|
packages/cli/src/evaluation.ee/ @n8n-io/ai-trust
|
||||||
packages/cli/src/chat/ @n8n-io/ai
|
packages/cli/src/chat/ @n8n-io/ai
|
||||||
packages/cli/src/tool-generation/ @n8n-io/ai
|
packages/cli/src/tool-generation/ @n8n-io/ai
|
||||||
packages/cli/src/modules/workflow-builder/ @n8n-io/ai-assistant
|
packages/modules/workflow-builder/ @n8n-io/ai-assistant
|
||||||
packages/cli/src/modules/mcp/ @n8n-io/context
|
packages/cli/src/modules/mcp/ @n8n-io/context
|
||||||
packages/cli/src/modules/quick-connect/ @n8n-io/ai
|
packages/modules/quick-connect/ @n8n-io/ai
|
||||||
packages/cli/src/modules/chat-hub/ @n8n-io/ai-assistant
|
packages/cli/src/modules/chat-hub/ @n8n-io/ai-assistant
|
||||||
packages/cli/src/modules/instance-ai/ @n8n-io/ai-assistant
|
packages/cli/src/modules/instance-ai/ @n8n-io/ai-assistant
|
||||||
|
packages/modules/inbox/ @n8n-io/ligo
|
||||||
|
|
||||||
packages/cli/src/modules/community-packages/ @n8n-io/nodes
|
packages/cli/src/modules/community-packages/ @n8n-io/nodes
|
||||||
|
|
||||||
|
|
@ -154,7 +155,6 @@ packages/cli/src/controllers/dynamic-node-parameters.controller.ts @n8n-io/node
|
||||||
packages/cli/src/controllers/e2e.controller.ts @n8n-io/qa-dx
|
packages/cli/src/controllers/e2e.controller.ts @n8n-io/qa-dx
|
||||||
|
|
||||||
# CLI services
|
# CLI services
|
||||||
packages/cli/src/services/jwt.service.ts @n8n-io/iam
|
|
||||||
packages/cli/src/services/user.service.ts @n8n-io/iam
|
packages/cli/src/services/user.service.ts @n8n-io/iam
|
||||||
packages/cli/src/services/password.utility.ts @n8n-io/iam
|
packages/cli/src/services/password.utility.ts @n8n-io/iam
|
||||||
packages/cli/src/services/public-api-key.service.ts @n8n-io/iam
|
packages/cli/src/services/public-api-key.service.ts @n8n-io/iam
|
||||||
|
|
@ -166,7 +166,7 @@ packages/cli/src/services/ai-usage.service.ts @n8n-io/ai-assistant
|
||||||
packages/cli/src/services/__tests__/ai-usage.service.test.ts @n8n-io/ai-assistant
|
packages/cli/src/services/__tests__/ai-usage.service.test.ts @n8n-io/ai-assistant
|
||||||
packages/cli/src/controllers/__tests__/ai.controller.test.ts @n8n-io/ai-assistant
|
packages/cli/src/controllers/__tests__/ai.controller.test.ts @n8n-io/ai-assistant
|
||||||
packages/cli/src/services/ai-workflow-builder.service.ts @n8n-io/ai-assistant
|
packages/cli/src/services/ai-workflow-builder.service.ts @n8n-io/ai-assistant
|
||||||
packages/cli/src/services/annotation-tag.service.ee.ts @n8n-io/ai
|
packages/cli/src/services/annotation-tag.service.ee.ts @n8n-io/context
|
||||||
packages/cli/src/services/folder.service.ts @n8n-io/context
|
packages/cli/src/services/folder.service.ts @n8n-io/context
|
||||||
packages/cli/src/services/tag.service.ts @n8n-io/context
|
packages/cli/src/services/tag.service.ts @n8n-io/context
|
||||||
packages/cli/src/services/cta.service.ts @n8n-io/knowledge
|
packages/cli/src/services/cta.service.ts @n8n-io/knowledge
|
||||||
|
|
@ -255,6 +255,27 @@ packages/@n8n/inbound-auth/ @n8n-io/iam
|
||||||
|
|
||||||
packages/modules/type-availability-policies/ @n8n-io/governance-and-observability
|
packages/modules/type-availability-policies/ @n8n-io/governance-and-observability
|
||||||
packages/cli/src/modules/type-availability-policies/ @n8n-io/governance-and-observability
|
packages/cli/src/modules/type-availability-policies/ @n8n-io/governance-and-observability
|
||||||
|
packages/modules/otel/ @n8n-io/governance-and-observability
|
||||||
|
packages/cli/src/modules/otel/ @n8n-io/governance-and-observability
|
||||||
|
packages/cli/src/public-api/v1/controllers/otel.public.controller.ts @n8n-io/governance-and-observability
|
||||||
|
packages/cli/src/public-api/v1/shared/otel.mapper.ts @n8n-io/governance-and-observability
|
||||||
|
packages/cli/src/public-api/v1/controllers/node-type-policies.public.controller.ts @n8n-io/governance-and-observability
|
||||||
|
packages/cli/src/public-api/v1/controllers/credential-type-policies.public.controller.ts @n8n-io/governance-and-observability
|
||||||
|
packages/cli/src/public-api/v1/handlers/node-type-policies/ @n8n-io/governance-and-observability
|
||||||
|
packages/cli/src/public-api/v1/handlers/credential-type-policies/ @n8n-io/governance-and-observability
|
||||||
|
packages/cli/src/modules/policy-infrastructure/ @n8n-io/governance-and-observability
|
||||||
|
packages/cli/src/policy/ @n8n-io/governance-and-observability
|
||||||
|
packages/@n8n/decorators/src/policy-check/ @n8n-io/governance-and-observability
|
||||||
|
packages/@n8n/api-types/src/dto/otel/ @n8n-io/governance-and-observability
|
||||||
|
packages/@n8n/api-types/src/dto/type-availability-policies/ @n8n-io/governance-and-observability
|
||||||
|
packages/@n8n/api-types/src/node-type-availability.ts @n8n-io/governance-and-observability
|
||||||
|
packages/@n8n/api-types/src/credential-type-availability.ts @n8n-io/governance-and-observability
|
||||||
|
packages/@n8n/api-types/src/schemas/policy-check-failure.schema.ts @n8n-io/governance-and-observability
|
||||||
|
packages/@n8n/api-types/src/schemas/policy-violation.schema.ts @n8n-io/governance-and-observability
|
||||||
|
packages/@n8n/telemetry/src/events/policies.ts @n8n-io/governance-and-observability
|
||||||
|
packages/@n8n/telemetry/src/events/type-availability-policies.ts @n8n-io/governance-and-observability
|
||||||
|
packages/workflow/src/errors/policy-refusal.ts @n8n-io/governance-and-observability
|
||||||
|
packages/frontend/editor-ui/src/app/composables/usePolicyViolationToast.ts @n8n-io/governance-and-observability
|
||||||
|
|
||||||
# CI/CD
|
# CI/CD
|
||||||
|
|
||||||
|
|
@ -282,3 +303,15 @@ packages/@n8n/db/src/entities/deployment-key.ts @n8n-io/iam required
|
||||||
packages/@n8n/db/src/repositories/deployment-key.repository.ts @n8n-io/iam required
|
packages/@n8n/db/src/repositories/deployment-key.repository.ts @n8n-io/iam required
|
||||||
packages/@n8n/eslint-config/src/configs/encryption-boundary.ts @n8n-io/iam required
|
packages/@n8n/eslint-config/src/configs/encryption-boundary.ts @n8n-io/iam required
|
||||||
packages/@n8n/eslint-config/src/rules/no-encryption-guardrail-disable.ts @n8n-io/iam required
|
packages/@n8n/eslint-config/src/rules/no-encryption-guardrail-disable.ts @n8n-io/iam required
|
||||||
|
|
||||||
|
# AI Trust (evaluations)
|
||||||
|
# Placed last so these rules override the broader package rules above.
|
||||||
|
|
||||||
|
packages/@n8n/instance-ai/evaluations/ @n8n-io/ai-trust
|
||||||
|
packages/cli/src/modules/instance-ai/eval/ @n8n-io/ai-trust
|
||||||
|
packages/quality/testing/playwright/tests/evals/instance-ai/ @n8n-io/ai-trust
|
||||||
|
.agents/skills/create-instance-ai-eval/ @n8n-io/ai-trust
|
||||||
|
.agents/skills/create-agent-builder-eval/ @n8n-io/ai-trust
|
||||||
|
packages/cli/src/modules/agent-evals/ @n8n-io/ai-trust
|
||||||
|
packages/@n8n/agents/src/evals/ @n8n-io/ai-trust
|
||||||
|
packages/frontend/editor-ui/src/features/ai/evaluation.ee/ @n8n-io/ai-trust
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"repository": "n8n-io/cat-bot",
|
"repository": "n8n-io/cat-bot",
|
||||||
"releaseTag": "harness-v0.3.0",
|
"releaseTag": "harness-v0.6.0",
|
||||||
"version": "0.3.0",
|
"version": "0.6.0",
|
||||||
"assetName": "n8n-opencode-harness-0.3.0.tgz"
|
"assetName": "n8n-opencode-harness-0.6.0.tgz"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,11 @@ set -eu
|
||||||
SCRIPT_VERSION="1.4.0"
|
SCRIPT_VERSION="1.4.0"
|
||||||
# The version to install is derived from the latest stable GitHub release in
|
# The version to install is derived from the latest stable GitHub release in
|
||||||
# resolve_n8n_version(); this fallback only applies when that lookup fails.
|
# resolve_n8n_version(); this fallback only applies when that lookup fails.
|
||||||
FALLBACK_N8N_VERSION="2.32.0"
|
FALLBACK_N8N_VERSION="2.43.4"
|
||||||
# Sandbox service release (API, runner and sandbox images ship together).
|
# Sandbox service release (API, runner and sandbox images ship together).
|
||||||
# Pinned here, not resolved at run time: the stack definition must match it.
|
# Pinned here, not resolved at run time: the stack definition must match it.
|
||||||
# --upgrade moves existing installs to this pin.
|
# --upgrade moves existing installs to this pin.
|
||||||
SANDBOX_VERSION="1.3.4"
|
SANDBOX_VERSION="1.8.1"
|
||||||
N8N_DIR="${N8N_DIR:-./n8n}"
|
N8N_DIR="${N8N_DIR:-./n8n}"
|
||||||
N8N_PORT=5678
|
N8N_PORT=5678
|
||||||
SOURCE_URL="https://github.com/n8n-io/n8n/blob/master/docker/get-n8n.sh"
|
SOURCE_URL="https://github.com/n8n-io/n8n/blob/master/docker/get-n8n.sh"
|
||||||
|
|
|
||||||
93
docs/generated/postgres-schema/README.md
generated
93
docs/generated/postgres-schema/README.md
generated
|
|
@ -29,12 +29,14 @@ Auto-generated from the PostgreSQL migrations in @n8n/db. Do not edit by hand.
|
||||||
| [public.agent_message_queue](public.agent_message_queue.md) | 10 | | BASE TABLE |
|
| [public.agent_message_queue](public.agent_message_queue.md) | 10 | | BASE TABLE |
|
||||||
| [public.agent_plan](public.agent_plan.md) | 8 | | BASE TABLE |
|
| [public.agent_plan](public.agent_plan.md) | 8 | | BASE TABLE |
|
||||||
| [public.agent_plan_history](public.agent_plan_history.md) | 6 | | BASE TABLE |
|
| [public.agent_plan_history](public.agent_plan_history.md) | 6 | | BASE TABLE |
|
||||||
|
| [public.agent_skill_dependency](public.agent_skill_dependency.md) | 4 | | BASE TABLE |
|
||||||
| [public.agent_task_definition](public.agent_task_definition.md) | 8 | | BASE TABLE |
|
| [public.agent_task_definition](public.agent_task_definition.md) | 8 | | BASE TABLE |
|
||||||
| [public.agent_task_run_lock](public.agent_task_run_lock.md) | 6 | | BASE TABLE |
|
| [public.agent_task_run_lock](public.agent_task_run_lock.md) | 6 | | BASE TABLE |
|
||||||
| [public.agent_task_snapshot](public.agent_task_snapshot.md) | 9 | | BASE TABLE |
|
| [public.agent_task_snapshot](public.agent_task_snapshot.md) | 9 | | BASE TABLE |
|
||||||
| [public.agent_thread_grants](public.agent_thread_grants.md) | 4 | | BASE TABLE |
|
| [public.agent_thread_grants](public.agent_thread_grants.md) | 4 | | BASE TABLE |
|
||||||
|
| [public.agent_version_skill_dependency](public.agent_version_skill_dependency.md) | 4 | | BASE TABLE |
|
||||||
| [public.agent_workflow_dependency](public.agent_workflow_dependency.md) | 3 | | BASE TABLE |
|
| [public.agent_workflow_dependency](public.agent_workflow_dependency.md) | 3 | | BASE TABLE |
|
||||||
| [public.agents](public.agents.md) | 14 | | BASE TABLE |
|
| [public.agents](public.agents.md) | 15 | | BASE TABLE |
|
||||||
| [public.agents_memory_entries](public.agents_memory_entries.md) | 13 | | BASE TABLE |
|
| [public.agents_memory_entries](public.agents_memory_entries.md) | 13 | | BASE TABLE |
|
||||||
| [public.agents_memory_entry_candidates](public.agents_memory_entry_candidates.md) | 14 | | BASE TABLE |
|
| [public.agents_memory_entry_candidates](public.agents_memory_entry_candidates.md) | 14 | | BASE TABLE |
|
||||||
| [public.agents_memory_entry_locks](public.agents_memory_entry_locks.md) | 6 | | BASE TABLE |
|
| [public.agents_memory_entry_locks](public.agents_memory_entry_locks.md) | 6 | | BASE TABLE |
|
||||||
|
|
@ -119,6 +121,8 @@ Auto-generated from the PostgreSQL migrations in @n8n/db. Do not edit by hand.
|
||||||
| [public.promotion_connection](public.promotion_connection.md) | 7 | | BASE TABLE |
|
| [public.promotion_connection](public.promotion_connection.md) | 7 | | BASE TABLE |
|
||||||
| [public.promotion_connection_project](public.promotion_connection_project.md) | 4 | | BASE TABLE |
|
| [public.promotion_connection_project](public.promotion_connection_project.md) | 4 | | BASE TABLE |
|
||||||
| [public.promotion_provider](public.promotion_provider.md) | 8 | | BASE TABLE |
|
| [public.promotion_provider](public.promotion_provider.md) | 8 | | BASE TABLE |
|
||||||
|
| [public.promotion_review](public.promotion_review.md) | 10 | | BASE TABLE |
|
||||||
|
| [public.promotion_run](public.promotion_run.md) | 8 | | BASE TABLE |
|
||||||
| [public.role](public.role.md) | 7 | | BASE TABLE |
|
| [public.role](public.role.md) | 7 | | BASE TABLE |
|
||||||
| [public.role_mapping_rule](public.role_mapping_rule.md) | 7 | | BASE TABLE |
|
| [public.role_mapping_rule](public.role_mapping_rule.md) | 7 | | BASE TABLE |
|
||||||
| [public.role_mapping_rule_project](public.role_mapping_rule_project.md) | 2 | | BASE TABLE |
|
| [public.role_mapping_rule_project](public.role_mapping_rule_project.md) | 2 | | BASE TABLE |
|
||||||
|
|
@ -131,6 +135,9 @@ Auto-generated from the PostgreSQL migrations in @n8n/db. Do not edit by hand.
|
||||||
| [public.settings](public.settings.md) | 3 | | BASE TABLE |
|
| [public.settings](public.settings.md) | 3 | | BASE TABLE |
|
||||||
| [public.shared_credentials](public.shared_credentials.md) | 5 | | BASE TABLE |
|
| [public.shared_credentials](public.shared_credentials.md) | 5 | | BASE TABLE |
|
||||||
| [public.shared_workflow](public.shared_workflow.md) | 5 | | BASE TABLE |
|
| [public.shared_workflow](public.shared_workflow.md) | 5 | | BASE TABLE |
|
||||||
|
| [public.skill](public.skill.md) | 7 | | BASE TABLE |
|
||||||
|
| [public.skill_file](public.skill_file.md) | 5 | | BASE TABLE |
|
||||||
|
| [public.skill_version](public.skill_version.md) | 11 | | BASE TABLE |
|
||||||
| [public.tag_entity](public.tag_entity.md) | 4 | | BASE TABLE |
|
| [public.tag_entity](public.tag_entity.md) | 4 | | BASE TABLE |
|
||||||
| [public.test_case_execution](public.test_case_execution.md) | 14 | | BASE TABLE |
|
| [public.test_case_execution](public.test_case_execution.md) | 14 | | BASE TABLE |
|
||||||
| [public.test_run](public.test_run.md) | 16 | | BASE TABLE |
|
| [public.test_run](public.test_run.md) | 16 | | BASE TABLE |
|
||||||
|
|
@ -223,13 +230,19 @@ erDiagram
|
||||||
"public.agent_message_queue" }o--|| "public.agent_execution_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agent_execution_threads(id) ON DELETE CASCADE"
|
"public.agent_message_queue" }o--|| "public.agent_execution_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agent_execution_threads(id) ON DELETE CASCADE"
|
||||||
"public.agent_plan" }o--|| "public.agent_execution_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agent_execution_threads(id) ON DELETE CASCADE"
|
"public.agent_plan" }o--|| "public.agent_execution_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agent_execution_threads(id) ON DELETE CASCADE"
|
||||||
"public.agent_plan_history" }o--|| "public.agent_plan" : "FOREIGN KEY (#quot;planId#quot;) REFERENCES agent_plan(id) ON DELETE CASCADE"
|
"public.agent_plan_history" }o--|| "public.agent_plan" : "FOREIGN KEY (#quot;planId#quot;) REFERENCES agent_plan(id) ON DELETE CASCADE"
|
||||||
|
"public.agent_skill_dependency" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
|
"public.agent_skill_dependency" }o--|| "public.skill" : "FOREIGN KEY (#quot;skillId#quot;) REFERENCES skill(id) ON DELETE CASCADE"
|
||||||
|
"public.agent_skill_dependency" }o--o| "public.skill_version" : "FOREIGN KEY (#quot;skillVersionId#quot;) REFERENCES skill_version(id)"
|
||||||
"public.agent_task_definition" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
"public.agent_task_definition" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
"public.agent_task_run_lock" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
"public.agent_task_run_lock" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
"public.agent_task_snapshot" }o--|| "public.agent_history" : "FOREIGN KEY (#quot;versionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE CASCADE"
|
"public.agent_task_snapshot" }o--|| "public.agent_history" : "FOREIGN KEY (#quot;versionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE CASCADE"
|
||||||
"public.agent_thread_grants" }o--|| "public.agent_execution_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agent_execution_threads(id) ON DELETE CASCADE"
|
"public.agent_thread_grants" }o--|| "public.agent_execution_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agent_execution_threads(id) ON DELETE CASCADE"
|
||||||
|
"public.agent_version_skill_dependency" }o--|| "public.agent_history" : "FOREIGN KEY (#quot;agentVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE CASCADE"
|
||||||
|
"public.agent_version_skill_dependency" }o--|| "public.skill" : "FOREIGN KEY (#quot;skillId#quot;) REFERENCES skill(id) ON DELETE CASCADE"
|
||||||
|
"public.agent_version_skill_dependency" }o--|| "public.skill_version" : "FOREIGN KEY (#quot;skillVersionId#quot;) REFERENCES skill_version(id)"
|
||||||
"public.agent_workflow_dependency" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
"public.agent_workflow_dependency" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
||||||
"public.agent_workflow_dependency" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
"public.agent_workflow_dependency" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
"public.agents" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.agents" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
"public.agents" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL"
|
"public.agents" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL"
|
||||||
"public.agents_memory_entries" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
"public.agents_memory_entries" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
"public.agents_memory_entries" }o--|| "public.agents_resources" : "FOREIGN KEY (#quot;resourceId#quot;) REFERENCES agents_resources(id) ON DELETE CASCADE"
|
"public.agents_memory_entries" }o--|| "public.agents_resources" : "FOREIGN KEY (#quot;resourceId#quot;) REFERENCES agents_resources(id) ON DELETE CASCADE"
|
||||||
|
|
@ -354,6 +367,12 @@ erDiagram
|
||||||
"public.promotion_connection" }o--|| "public.promotion_provider" : "FOREIGN KEY (#quot;providerId#quot;) REFERENCES promotion_provider(id) ON DELETE RESTRICT"
|
"public.promotion_connection" }o--|| "public.promotion_provider" : "FOREIGN KEY (#quot;providerId#quot;) REFERENCES promotion_provider(id) ON DELETE RESTRICT"
|
||||||
"public.promotion_connection_project" |o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.promotion_connection_project" |o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
"public.promotion_connection_project" }o--|| "public.promotion_connection" : "FOREIGN KEY (#quot;connectionId#quot;) REFERENCES promotion_connection(id) ON DELETE CASCADE"
|
"public.promotion_connection_project" }o--|| "public.promotion_connection" : "FOREIGN KEY (#quot;connectionId#quot;) REFERENCES promotion_connection(id) ON DELETE CASCADE"
|
||||||
|
"public.promotion_review" }o--o| "public.user" : "FOREIGN KEY (#quot;approvedById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
|
"public.promotion_review" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
|
"public.promotion_review" }o--o| "public.promotion_connection" : "FOREIGN KEY (#quot;connectionId#quot;) REFERENCES promotion_connection(id) ON DELETE SET NULL"
|
||||||
|
"public.promotion_run" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
|
"public.promotion_run" }o--o| "public.promotion_config" : "FOREIGN KEY (#quot;configId#quot;) REFERENCES promotion_config(id) ON DELETE SET NULL"
|
||||||
|
"public.promotion_run" }o--o| "public.promotion_review" : "FOREIGN KEY (#quot;reviewId#quot;) REFERENCES promotion_review(id) ON DELETE SET NULL"
|
||||||
"public.role_mapping_rule" }o--|| "public.role" : "FOREIGN KEY (role) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE"
|
"public.role_mapping_rule" }o--|| "public.role" : "FOREIGN KEY (role) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE"
|
||||||
"public.role_mapping_rule_project" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.role_mapping_rule_project" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
"public.role_mapping_rule_project" }o--|| "public.role_mapping_rule" : "FOREIGN KEY (#quot;roleMappingRuleId#quot;) REFERENCES role_mapping_rule(id) ON DELETE CASCADE"
|
"public.role_mapping_rule_project" }o--|| "public.role_mapping_rule" : "FOREIGN KEY (#quot;roleMappingRuleId#quot;) REFERENCES role_mapping_rule(id) ON DELETE CASCADE"
|
||||||
|
|
@ -369,6 +388,12 @@ erDiagram
|
||||||
"public.shared_credentials" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.shared_credentials" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
"public.shared_workflow" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
"public.shared_workflow" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
||||||
"public.shared_workflow" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.shared_workflow" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
|
"public.skill" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
|
"public.skill" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
|
"public.skill" }o--o| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
|
"public.skill_file" }o--|| "public.skill_version" : "FOREIGN KEY (#quot;skillVersionId#quot;) REFERENCES skill_version(id) ON DELETE CASCADE"
|
||||||
|
"public.skill_version" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
|
"public.skill_version" }o--|| "public.skill" : "FOREIGN KEY (#quot;skillId#quot;) REFERENCES skill(id) ON DELETE CASCADE"
|
||||||
"public.test_case_execution" }o--o| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE SET NULL"
|
"public.test_case_execution" }o--o| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE SET NULL"
|
||||||
"public.test_case_execution" }o--|| "public.test_run" : "FOREIGN KEY (#quot;testRunId#quot;) REFERENCES test_run(id) ON DELETE CASCADE"
|
"public.test_case_execution" }o--|| "public.test_run" : "FOREIGN KEY (#quot;testRunId#quot;) REFERENCES test_run(id) ON DELETE CASCADE"
|
||||||
"public.test_run" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
"public.test_run" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
||||||
|
|
@ -679,6 +704,12 @@ erDiagram
|
||||||
uuid planId FK
|
uuid planId FK
|
||||||
integer revision
|
integer revision
|
||||||
}
|
}
|
||||||
|
"public.agent_skill_dependency" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
uuid skillVersionId FK
|
||||||
|
}
|
||||||
"public.agent_task_definition" {
|
"public.agent_task_definition" {
|
||||||
varchar_36_ agentId FK
|
varchar_36_ agentId FK
|
||||||
timestamp_3__with_time_zone createdAt
|
timestamp_3__with_time_zone createdAt
|
||||||
|
|
@ -714,6 +745,12 @@ erDiagram
|
||||||
varchar_128_ threadId FK
|
varchar_128_ threadId FK
|
||||||
timestamp_3__with_time_zone updatedAt
|
timestamp_3__with_time_zone updatedAt
|
||||||
}
|
}
|
||||||
|
"public.agent_version_skill_dependency" {
|
||||||
|
varchar_36_ agentVersionId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
uuid skillVersionId FK
|
||||||
|
}
|
||||||
"public.agent_workflow_dependency" {
|
"public.agent_workflow_dependency" {
|
||||||
varchar_36_ agentId FK
|
varchar_36_ agentId FK
|
||||||
timestamp_3__with_time_zone createdAt
|
timestamp_3__with_time_zone createdAt
|
||||||
|
|
@ -729,6 +766,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
@ -1527,6 +1565,28 @@ erDiagram
|
||||||
varchar_32_ type
|
varchar_32_ type
|
||||||
timestamp_3__with_time_zone updatedAt
|
timestamp_3__with_time_zone updatedAt
|
||||||
}
|
}
|
||||||
|
"public.promotion_review" {
|
||||||
|
timestamp_3__with_time_zone approvedAt
|
||||||
|
uuid approvedById FK
|
||||||
|
varchar_36_ connectionId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
uuid id
|
||||||
|
timestamp_3__with_time_zone lastStateChangeAt
|
||||||
|
varchar_255_ remoteReviewId
|
||||||
|
varchar_32_ state
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
|
"public.promotion_run" {
|
||||||
|
varchar_36_ configId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
json details
|
||||||
|
varchar_16_ direction
|
||||||
|
uuid id
|
||||||
|
uuid reviewId FK
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
"public.role" {
|
"public.role" {
|
||||||
timestamp_3__with_time_zone createdAt
|
timestamp_3__with_time_zone createdAt
|
||||||
text description
|
text description
|
||||||
|
|
@ -1651,6 +1711,35 @@ erDiagram
|
||||||
timestamp_3__with_time_zone updatedAt
|
timestamp_3__with_time_zone updatedAt
|
||||||
varchar_36_ workflowId FK
|
varchar_36_ workflowId FK
|
||||||
}
|
}
|
||||||
|
"public.skill" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
varchar_36_ id
|
||||||
|
varchar_36_ projectId FK
|
||||||
|
varchar_16_ source
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
|
"public.skill_file" {
|
||||||
|
text content
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
varchar_512_ path
|
||||||
|
uuid skillVersionId FK
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
|
"public.skill_version" {
|
||||||
|
varchar_64_ contentHash
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
varchar_1024_ description
|
||||||
|
json frontmatter
|
||||||
|
uuid id
|
||||||
|
text instructions
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
integer version
|
||||||
|
}
|
||||||
"public.tag_entity" {
|
"public.tag_entity" {
|
||||||
timestamp_3__with_time_zone createdAt
|
timestamp_3__with_time_zone createdAt
|
||||||
varchar_36_ id
|
varchar_36_ id
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
| skills | json | | true | | | Frozen map of `skillId → AgentSkill` at publish time |
|
| skills | json | | true | | | Frozen map of `skillId → AgentSkill` at publish time |
|
||||||
| tools | json | | true | | | Frozen map of `toolId → { code, descriptor }` at publish time |
|
| tools | json | | true | | | Frozen map of `toolId → { code, descriptor }` at publish time |
|
||||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||||
| versionId | varchar(36) | | false | [public.agent_execution_threads](public.agent_execution_threads.md) [public.agent_task_snapshot](public.agent_task_snapshot.md) [public.agents](public.agents.md) | | |
|
| versionId | varchar(36) | | false | [public.agent_execution_threads](public.agent_execution_threads.md) [public.agent_task_snapshot](public.agent_task_snapshot.md) [public.agent_version_skill_dependency](public.agent_version_skill_dependency.md) [public.agents](public.agents.md) | | |
|
||||||
|
|
||||||
## Constraints
|
## Constraints
|
||||||
|
|
||||||
|
|
@ -43,6 +43,7 @@ erDiagram
|
||||||
"public.agent_history" }o--o| "public.user" : "FOREIGN KEY (#quot;publishedById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
"public.agent_history" }o--o| "public.user" : "FOREIGN KEY (#quot;publishedById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
"public.agent_execution_threads" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;taskVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL"
|
"public.agent_execution_threads" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;taskVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL"
|
||||||
"public.agent_task_snapshot" }o--|| "public.agent_history" : "FOREIGN KEY (#quot;versionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE CASCADE"
|
"public.agent_task_snapshot" }o--|| "public.agent_history" : "FOREIGN KEY (#quot;versionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE CASCADE"
|
||||||
|
"public.agent_version_skill_dependency" }o--|| "public.agent_history" : "FOREIGN KEY (#quot;agentVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE CASCADE"
|
||||||
"public.agents" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL"
|
"public.agents" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL"
|
||||||
|
|
||||||
"public.agent_history" {
|
"public.agent_history" {
|
||||||
|
|
@ -66,6 +67,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
@ -121,6 +123,12 @@ erDiagram
|
||||||
timestamp_3__with_time_zone updatedAt
|
timestamp_3__with_time_zone updatedAt
|
||||||
varchar_36_ versionId FK
|
varchar_36_ versionId FK
|
||||||
}
|
}
|
||||||
|
"public.agent_version_skill_dependency" {
|
||||||
|
varchar_36_ agentVersionId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
uuid skillVersionId FK
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
89
docs/generated/postgres-schema/public.agent_skill_dependency.md
generated
Normal file
89
docs/generated/postgres-schema/public.agent_skill_dependency.md
generated
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
# public.agent_skill_dependency
|
||||||
|
|
||||||
|
## Columns
|
||||||
|
|
||||||
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||||
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||||
|
| agentId | varchar(36) | | false | | [public.agents](public.agents.md) | |
|
||||||
|
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||||
|
| skillId | varchar(36) | | false | | [public.skill](public.skill.md) | |
|
||||||
|
| skillVersionId | uuid | | true | | [public.skill_version](public.skill_version.md) | Set when the agent draft pins a saved version. NULL = follows the latest saved version |
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
| Name | Type | Definition |
|
||||||
|
| ---- | ---- | ---------- |
|
||||||
|
| FK_068f21aefba31ae621482f396dc | FOREIGN KEY | FOREIGN KEY ("skillId") REFERENCES skill(id) ON DELETE CASCADE |
|
||||||
|
| FK_72325bb13511a51847c53fcb377 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
|
||||||
|
| FK_7676571bd6f41d9e32f0d066fe9 | FOREIGN KEY | FOREIGN KEY ("skillVersionId") REFERENCES skill_version(id) |
|
||||||
|
| PK_18a54f60491d3e2aa2200b70f4a | PRIMARY KEY | PRIMARY KEY ("agentId", "skillId") |
|
||||||
|
| agent_skill_dependency_agentId_not_null | n | NOT NULL "agentId" |
|
||||||
|
| agent_skill_dependency_createdAt_not_null | n | NOT NULL "createdAt" |
|
||||||
|
| agent_skill_dependency_skillId_not_null | n | NOT NULL "skillId" |
|
||||||
|
|
||||||
|
## Indexes
|
||||||
|
|
||||||
|
| Name | Definition |
|
||||||
|
| ---- | ---------- |
|
||||||
|
| IDX_068f21aefba31ae621482f396d | CREATE INDEX "IDX_068f21aefba31ae621482f396d" ON public.agent_skill_dependency USING btree ("skillId") |
|
||||||
|
| PK_18a54f60491d3e2aa2200b70f4a | CREATE UNIQUE INDEX "PK_18a54f60491d3e2aa2200b70f4a" ON public.agent_skill_dependency USING btree ("agentId", "skillId") |
|
||||||
|
|
||||||
|
## Relations
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
erDiagram
|
||||||
|
|
||||||
|
"public.agent_skill_dependency" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
|
"public.agent_skill_dependency" }o--|| "public.skill" : "FOREIGN KEY (#quot;skillId#quot;) REFERENCES skill(id) ON DELETE CASCADE"
|
||||||
|
"public.agent_skill_dependency" }o--o| "public.skill_version" : "FOREIGN KEY (#quot;skillVersionId#quot;) REFERENCES skill_version(id)"
|
||||||
|
|
||||||
|
"public.agent_skill_dependency" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
uuid skillVersionId FK
|
||||||
|
}
|
||||||
|
"public.agents" {
|
||||||
|
varchar_36_ activeVersionId FK
|
||||||
|
boolean availableInMCP
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
varchar_36_ id
|
||||||
|
json integrations
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_255_ projectId FK
|
||||||
|
integer revision
|
||||||
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
|
json skills
|
||||||
|
json tools
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
varchar_36_ versionId
|
||||||
|
}
|
||||||
|
"public.skill" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
varchar_36_ id
|
||||||
|
varchar_36_ projectId FK
|
||||||
|
varchar_16_ source
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
|
"public.skill_version" {
|
||||||
|
varchar_64_ contentHash
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
varchar_1024_ description
|
||||||
|
json frontmatter
|
||||||
|
uuid id
|
||||||
|
text instructions
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
integer version
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||||
|
|
@ -61,6 +61,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
85
docs/generated/postgres-schema/public.agent_version_skill_dependency.md
generated
Normal file
85
docs/generated/postgres-schema/public.agent_version_skill_dependency.md
generated
Normal file
|
|
@ -0,0 +1,85 @@
|
||||||
|
# public.agent_version_skill_dependency
|
||||||
|
|
||||||
|
## Columns
|
||||||
|
|
||||||
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||||
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||||
|
| agentVersionId | varchar(36) | | false | | [public.agent_history](public.agent_history.md) | |
|
||||||
|
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||||
|
| skillId | varchar(36) | | false | | [public.skill](public.skill.md) | |
|
||||||
|
| skillVersionId | uuid | | false | | [public.skill_version](public.skill_version.md) | |
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
| Name | Type | Definition |
|
||||||
|
| ---- | ---- | ---------- |
|
||||||
|
| FK_97472baf9196d914d9cd9de6201 | FOREIGN KEY | FOREIGN KEY ("agentVersionId") REFERENCES agent_history("versionId") ON DELETE CASCADE |
|
||||||
|
| FK_c494292243a7e510acd0331c3d1 | FOREIGN KEY | FOREIGN KEY ("skillId") REFERENCES skill(id) ON DELETE CASCADE |
|
||||||
|
| FK_df63badfd7d3f2aa622ece471c4 | FOREIGN KEY | FOREIGN KEY ("skillVersionId") REFERENCES skill_version(id) |
|
||||||
|
| PK_df0a2577371b94f3c7008d81822 | PRIMARY KEY | PRIMARY KEY ("agentVersionId", "skillId") |
|
||||||
|
| agent_version_skill_dependency_agentVersionId_not_null | n | NOT NULL "agentVersionId" |
|
||||||
|
| agent_version_skill_dependency_createdAt_not_null | n | NOT NULL "createdAt" |
|
||||||
|
| agent_version_skill_dependency_skillId_not_null | n | NOT NULL "skillId" |
|
||||||
|
| agent_version_skill_dependency_skillVersionId_not_null | n | NOT NULL "skillVersionId" |
|
||||||
|
|
||||||
|
## Indexes
|
||||||
|
|
||||||
|
| Name | Definition |
|
||||||
|
| ---- | ---------- |
|
||||||
|
| IDX_c494292243a7e510acd0331c3d | CREATE INDEX "IDX_c494292243a7e510acd0331c3d" ON public.agent_version_skill_dependency USING btree ("skillId") |
|
||||||
|
| IDX_df63badfd7d3f2aa622ece471c | CREATE INDEX "IDX_df63badfd7d3f2aa622ece471c" ON public.agent_version_skill_dependency USING btree ("skillVersionId") |
|
||||||
|
| PK_df0a2577371b94f3c7008d81822 | CREATE UNIQUE INDEX "PK_df0a2577371b94f3c7008d81822" ON public.agent_version_skill_dependency USING btree ("agentVersionId", "skillId") |
|
||||||
|
|
||||||
|
## Relations
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
erDiagram
|
||||||
|
|
||||||
|
"public.agent_version_skill_dependency" }o--|| "public.agent_history" : "FOREIGN KEY (#quot;agentVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE CASCADE"
|
||||||
|
"public.agent_version_skill_dependency" }o--|| "public.skill" : "FOREIGN KEY (#quot;skillId#quot;) REFERENCES skill(id) ON DELETE CASCADE"
|
||||||
|
"public.agent_version_skill_dependency" }o--|| "public.skill_version" : "FOREIGN KEY (#quot;skillVersionId#quot;) REFERENCES skill_version(id)"
|
||||||
|
|
||||||
|
"public.agent_version_skill_dependency" {
|
||||||
|
varchar_36_ agentVersionId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
uuid skillVersionId FK
|
||||||
|
}
|
||||||
|
"public.agent_history" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
varchar_255_ author
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid publishedById FK
|
||||||
|
json schema
|
||||||
|
json skills
|
||||||
|
json tools
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
varchar_36_ versionId
|
||||||
|
}
|
||||||
|
"public.skill" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
varchar_36_ id
|
||||||
|
varchar_36_ projectId FK
|
||||||
|
varchar_16_ source
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
|
"public.skill_version" {
|
||||||
|
varchar_64_ contentHash
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
varchar_1024_ description
|
||||||
|
json frontmatter
|
||||||
|
uuid id
|
||||||
|
text instructions
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
integer version
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||||
|
|
@ -49,6 +49,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
29
docs/generated/postgres-schema/public.agents.md
generated
29
docs/generated/postgres-schema/public.agents.md
generated
|
|
@ -7,12 +7,13 @@
|
||||||
| activeVersionId | varchar(36) | | true | | [public.agent_history](public.agent_history.md) | |
|
| activeVersionId | varchar(36) | | true | | [public.agent_history](public.agent_history.md) | |
|
||||||
| availableInMCP | boolean | false | false | | | Whether MCP clients granted agent scopes may operate on this agent |
|
| availableInMCP | boolean | false | false | | | Whether MCP clients granted agent scopes may operate on this agent |
|
||||||
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||||
| id | varchar(36) | | false | [public.agent_background_job](public.agent_background_job.md) [public.agent_channel_status](public.agent_channel_status.md) [public.agent_chat_attachments](public.agent_chat_attachments.md) [public.agent_chat_subscriptions](public.agent_chat_subscriptions.md) [public.agent_checkpoints](public.agent_checkpoints.md) [public.agent_credential_dependency](public.agent_credential_dependency.md) [public.agent_eval_dataset](public.agent_eval_dataset.md) [public.agent_execution_threads](public.agent_execution_threads.md) [public.agent_files](public.agent_files.md) [public.agent_history](public.agent_history.md) [public.agent_task_definition](public.agent_task_definition.md) [public.agent_task_run_lock](public.agent_task_run_lock.md) [public.agent_workflow_dependency](public.agent_workflow_dependency.md) [public.agents_memory_entries](public.agents_memory_entries.md) [public.agents_memory_entry_candidates](public.agents_memory_entry_candidates.md) [public.agents_memory_entry_locks](public.agents_memory_entry_locks.md) [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) [public.agents_observation_cursors](public.agents_observation_cursors.md) [public.agents_observation_locks](public.agents_observation_locks.md) [public.agents_observations](public.agents_observations.md) | | |
|
| id | varchar(36) | | false | [public.agent_background_job](public.agent_background_job.md) [public.agent_channel_status](public.agent_channel_status.md) [public.agent_chat_attachments](public.agent_chat_attachments.md) [public.agent_chat_subscriptions](public.agent_chat_subscriptions.md) [public.agent_checkpoints](public.agent_checkpoints.md) [public.agent_credential_dependency](public.agent_credential_dependency.md) [public.agent_eval_dataset](public.agent_eval_dataset.md) [public.agent_execution_threads](public.agent_execution_threads.md) [public.agent_files](public.agent_files.md) [public.agent_history](public.agent_history.md) [public.agent_skill_dependency](public.agent_skill_dependency.md) [public.agent_task_definition](public.agent_task_definition.md) [public.agent_task_run_lock](public.agent_task_run_lock.md) [public.agent_workflow_dependency](public.agent_workflow_dependency.md) [public.agents_memory_entries](public.agents_memory_entries.md) [public.agents_memory_entry_candidates](public.agents_memory_entry_candidates.md) [public.agents_memory_entry_locks](public.agents_memory_entry_locks.md) [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) [public.agents_observation_cursors](public.agents_observation_cursors.md) [public.agents_observation_locks](public.agents_observation_locks.md) [public.agents_observations](public.agents_observations.md) [public.skill](public.skill.md) | | |
|
||||||
| integrations | json | '[]'::json | false | | | |
|
| integrations | json | '[]'::json | false | | | |
|
||||||
| name | varchar(128) | | false | | | |
|
| name | varchar(128) | | false | | | |
|
||||||
| projectId | varchar(255) | | false | | [public.project](public.project.md) | |
|
| projectId | varchar(255) | | true | | [public.project](public.project.md) | |
|
||||||
| revision | integer | 0 | false | | | |
|
| revision | integer | 0 | false | | | |
|
||||||
| schema | json | | true | | | |
|
| schema | json | | true | | | |
|
||||||
|
| scope | varchar(16) | 'project'::character varying | false | | | project: belongs to projectId; instance: code-defined, belongs to no project (projectId is null) |
|
||||||
| setupCompletedAt | timestamp(3) with time zone | | true | | | When this agent first reached a complete, publishable setup |
|
| setupCompletedAt | timestamp(3) with time zone | | true | | | When this agent first reached a complete, publishable setup |
|
||||||
| skills | json | '{}'::json | false | | | |
|
| skills | json | '{}'::json | false | | | |
|
||||||
| tools | json | '{}'::json | false | | | |
|
| tools | json | '{}'::json | false | | | |
|
||||||
|
|
@ -23,6 +24,8 @@
|
||||||
|
|
||||||
| Name | Type | Definition |
|
| Name | Type | Definition |
|
||||||
| ---- | ---- | ---------- |
|
| ---- | ---- | ---------- |
|
||||||
|
| CHK_agents_scope | CHECK | CHECK (((scope)::text = ANY ((ARRAY['project'::character varying, 'instance'::character varying])::text[]))) |
|
||||||
|
| CHK_agents_scope_project | CHECK | CHECK ((((scope)::text = 'instance'::text) = ("projectId" IS NULL))) |
|
||||||
| FK_940597dfe9753375309ce6aeea0 | FOREIGN KEY | FOREIGN KEY ("activeVersionId") REFERENCES agent_history("versionId") ON DELETE SET NULL |
|
| FK_940597dfe9753375309ce6aeea0 | FOREIGN KEY | FOREIGN KEY ("activeVersionId") REFERENCES agent_history("versionId") ON DELETE SET NULL |
|
||||||
| FK_a30d560207c4071d98aa03c179c | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
|
| FK_a30d560207c4071d98aa03c179c | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
|
||||||
| PK_9c653f28ae19c5884d5baf6a1d9 | PRIMARY KEY | PRIMARY KEY (id) |
|
| PK_9c653f28ae19c5884d5baf6a1d9 | PRIMARY KEY | PRIMARY KEY (id) |
|
||||||
|
|
@ -31,8 +34,8 @@
|
||||||
| agents_id_not_null | n | NOT NULL id |
|
| agents_id_not_null | n | NOT NULL id |
|
||||||
| agents_integrations_not_null | n | NOT NULL integrations |
|
| agents_integrations_not_null | n | NOT NULL integrations |
|
||||||
| agents_name_not_null | n | NOT NULL name |
|
| agents_name_not_null | n | NOT NULL name |
|
||||||
| agents_projectId_not_null | n | NOT NULL "projectId" |
|
|
||||||
| agents_revision_not_null | n | NOT NULL revision |
|
| agents_revision_not_null | n | NOT NULL revision |
|
||||||
|
| agents_scope_not_null | n | NOT NULL scope |
|
||||||
| agents_skills_not_null | n | NOT NULL skills |
|
| agents_skills_not_null | n | NOT NULL skills |
|
||||||
| agents_tools_not_null | n | NOT NULL tools |
|
| agents_tools_not_null | n | NOT NULL tools |
|
||||||
| agents_updatedAt_not_null | n | NOT NULL "updatedAt" |
|
| agents_updatedAt_not_null | n | NOT NULL "updatedAt" |
|
||||||
|
|
@ -61,6 +64,7 @@ erDiagram
|
||||||
"public.agent_execution_threads" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
"public.agent_execution_threads" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
"public.agent_files" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
"public.agent_files" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
"public.agent_history" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
"public.agent_history" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
|
"public.agent_skill_dependency" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
"public.agent_task_definition" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
"public.agent_task_definition" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
"public.agent_task_run_lock" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
"public.agent_task_run_lock" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
"public.agent_workflow_dependency" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
"public.agent_workflow_dependency" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
|
|
@ -71,7 +75,8 @@ erDiagram
|
||||||
"public.agents_observation_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
"public.agents_observation_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
"public.agents_observation_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
"public.agents_observation_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
"public.agents_observations" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
"public.agents_observations" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
"public.agents" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.skill" }o--o| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
|
"public.agents" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
|
|
||||||
"public.agents" {
|
"public.agents" {
|
||||||
varchar_36_ activeVersionId FK
|
varchar_36_ activeVersionId FK
|
||||||
|
|
@ -83,6 +88,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
@ -216,6 +222,12 @@ erDiagram
|
||||||
varchar_2_ storedAt
|
varchar_2_ storedAt
|
||||||
timestamp_3__with_time_zone updatedAt
|
timestamp_3__with_time_zone updatedAt
|
||||||
}
|
}
|
||||||
|
"public.agent_skill_dependency" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
uuid skillVersionId FK
|
||||||
|
}
|
||||||
"public.agent_task_definition" {
|
"public.agent_task_definition" {
|
||||||
varchar_36_ agentId FK
|
varchar_36_ agentId FK
|
||||||
timestamp_3__with_time_zone createdAt
|
timestamp_3__with_time_zone createdAt
|
||||||
|
|
@ -320,6 +332,15 @@ erDiagram
|
||||||
integer tokenCount
|
integer tokenCount
|
||||||
timestamp_3__with_time_zone updatedAt
|
timestamp_3__with_time_zone updatedAt
|
||||||
}
|
}
|
||||||
|
"public.skill" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
varchar_36_ id
|
||||||
|
varchar_36_ projectId FK
|
||||||
|
varchar_16_ source
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
"public.project" {
|
"public.project" {
|
||||||
timestamp_3__with_time_zone createdAt
|
timestamp_3__with_time_zone createdAt
|
||||||
uuid creatorId FK
|
uuid creatorId FK
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
|
||||||
15
docs/generated/postgres-schema/public.project.md
generated
15
docs/generated/postgres-schema/public.project.md
generated
|
|
@ -9,7 +9,7 @@
|
||||||
| customTelemetryTags | json | '[]'::json | false | | | |
|
| customTelemetryTags | json | '[]'::json | false | | | |
|
||||||
| description | varchar(512) | | true | | | |
|
| description | varchar(512) | | true | | | |
|
||||||
| icon | json | | true | | | |
|
| icon | json | | true | | | |
|
||||||
| id | varchar(36) | | false | [public.activity_event](public.activity_event.md) [public.agent_chat_attachments](public.agent_chat_attachments.md) [public.agent_execution_threads](public.agent_execution_threads.md) [public.agents](public.agents.md) [public.ai_preference](public.ai_preference.md) [public.data_table](public.data_table.md) [public.folder](public.folder.md) [public.insights_metadata](public.insights_metadata.md) [public.instance_ai_threads](public.instance_ai_threads.md) [public.project_pool_settings](public.project_pool_settings.md) [public.project_relation](public.project_relation.md) [public.project_secrets_provider_access](public.project_secrets_provider_access.md) [public.promotion_connection_project](public.promotion_connection_project.md) [public.role_mapping_rule_project](public.role_mapping_rule_project.md) [public.self_healing_result](public.self_healing_result.md) [public.shared_credentials](public.shared_credentials.md) [public.shared_workflow](public.shared_workflow.md) [public.type_availability_policy_scope](public.type_availability_policy_scope.md) [public.variables](public.variables.md) [public.workflow_review_request](public.workflow_review_request.md) [public.workflow_suggestion](public.workflow_suggestion.md) | | |
|
| id | varchar(36) | | false | [public.activity_event](public.activity_event.md) [public.agent_chat_attachments](public.agent_chat_attachments.md) [public.agent_execution_threads](public.agent_execution_threads.md) [public.agents](public.agents.md) [public.ai_preference](public.ai_preference.md) [public.data_table](public.data_table.md) [public.folder](public.folder.md) [public.insights_metadata](public.insights_metadata.md) [public.instance_ai_threads](public.instance_ai_threads.md) [public.project_pool_settings](public.project_pool_settings.md) [public.project_relation](public.project_relation.md) [public.project_secrets_provider_access](public.project_secrets_provider_access.md) [public.promotion_connection_project](public.promotion_connection_project.md) [public.role_mapping_rule_project](public.role_mapping_rule_project.md) [public.self_healing_result](public.self_healing_result.md) [public.shared_credentials](public.shared_credentials.md) [public.shared_workflow](public.shared_workflow.md) [public.skill](public.skill.md) [public.type_availability_policy_scope](public.type_availability_policy_scope.md) [public.variables](public.variables.md) [public.workflow_review_request](public.workflow_review_request.md) [public.workflow_suggestion](public.workflow_suggestion.md) | | |
|
||||||
| name | varchar(255) | | false | | | |
|
| name | varchar(255) | | false | | | |
|
||||||
| type | varchar(36) | | false | | | |
|
| type | varchar(36) | | false | | | |
|
||||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||||
|
|
@ -42,7 +42,7 @@ erDiagram
|
||||||
"public.activity_event" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.activity_event" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
"public.agent_chat_attachments" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.agent_chat_attachments" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
"public.agent_execution_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.agent_execution_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
"public.agents" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.agents" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
"public.ai_preference" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.ai_preference" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
"public.data_table" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.data_table" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
"public.folder" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.folder" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
|
|
@ -56,6 +56,7 @@ erDiagram
|
||||||
"public.self_healing_result" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.self_healing_result" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
"public.shared_credentials" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.shared_credentials" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
"public.shared_workflow" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.shared_workflow" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
|
"public.skill" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
"public.type_availability_policy_scope" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.type_availability_policy_scope" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
"public.variables" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.variables" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
"public.workflow_review_request" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
"public.workflow_review_request" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
|
|
@ -147,6 +148,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
integer revision
|
integer revision
|
||||||
json schema
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
timestamp_3__with_time_zone setupCompletedAt
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
json skills
|
json skills
|
||||||
json tools
|
json tools
|
||||||
|
|
@ -255,6 +257,15 @@ erDiagram
|
||||||
timestamp_3__with_time_zone updatedAt
|
timestamp_3__with_time_zone updatedAt
|
||||||
varchar_36_ workflowId FK
|
varchar_36_ workflowId FK
|
||||||
}
|
}
|
||||||
|
"public.skill" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
varchar_36_ id
|
||||||
|
varchar_36_ projectId FK
|
||||||
|
varchar_16_ source
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
"public.type_availability_policy_scope" {
|
"public.type_availability_policy_scope" {
|
||||||
timestamp_3__with_time_zone createdAt
|
timestamp_3__with_time_zone createdAt
|
||||||
varchar_16_ defaultAction
|
varchar_16_ defaultAction
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
| connectionId | varchar(36) | | false | | [public.promotion_connection](public.promotion_connection.md) | |
|
| connectionId | varchar(36) | | false | | [public.promotion_connection](public.promotion_connection.md) | |
|
||||||
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||||
| direction | varchar(16) | | false | | | PromotionDirection enum: "apply", "promote". Cannot change after creation. |
|
| direction | varchar(16) | | false | | | PromotionDirection enum: "apply", "promote". Cannot change after creation. |
|
||||||
| id | varchar(36) | | false | | | Also the name of the local checkout directory. |
|
| id | varchar(36) | | false | [public.promotion_run](public.promotion_run.md) | | Also the name of the local checkout directory. |
|
||||||
| name | varchar(128) | | false | | | |
|
| name | varchar(128) | | false | | | |
|
||||||
| settings | json | | false | | | Branch settings for this direction, with their own schemaVersion. Validated in code. |
|
| settings | json | | false | | | Branch settings for this direction, with their own schemaVersion. Validated in code. |
|
||||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||||
|
|
@ -40,6 +40,7 @@
|
||||||
erDiagram
|
erDiagram
|
||||||
|
|
||||||
"public.promotion_config" }o--|| "public.promotion_connection" : "FOREIGN KEY (#quot;connectionId#quot;) REFERENCES promotion_connection(id) ON DELETE CASCADE"
|
"public.promotion_config" }o--|| "public.promotion_connection" : "FOREIGN KEY (#quot;connectionId#quot;) REFERENCES promotion_connection(id) ON DELETE CASCADE"
|
||||||
|
"public.promotion_run" }o--o| "public.promotion_config" : "FOREIGN KEY (#quot;configId#quot;) REFERENCES promotion_config(id) ON DELETE SET NULL"
|
||||||
|
|
||||||
"public.promotion_config" {
|
"public.promotion_config" {
|
||||||
varchar_36_ connectionId FK
|
varchar_36_ connectionId FK
|
||||||
|
|
@ -59,6 +60,16 @@ erDiagram
|
||||||
json target
|
json target
|
||||||
timestamp_3__with_time_zone updatedAt
|
timestamp_3__with_time_zone updatedAt
|
||||||
}
|
}
|
||||||
|
"public.promotion_run" {
|
||||||
|
varchar_36_ configId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
json details
|
||||||
|
varchar_16_ direction
|
||||||
|
uuid id
|
||||||
|
uuid reviewId FK
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||||
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||||
| id | varchar(36) | | false | [public.promotion_config](public.promotion_config.md) [public.promotion_connection_project](public.promotion_connection_project.md) | | |
|
| id | varchar(36) | | false | [public.promotion_config](public.promotion_config.md) [public.promotion_connection_project](public.promotion_connection_project.md) [public.promotion_review](public.promotion_review.md) | | |
|
||||||
| name | varchar(128) | | false | | | |
|
| name | varchar(128) | | false | | | |
|
||||||
| providerId | varchar(36) | | false | | [public.promotion_provider](public.promotion_provider.md) | The provider whose credentials this connection uses. |
|
| providerId | varchar(36) | | false | | [public.promotion_provider](public.promotion_provider.md) | The provider whose credentials this connection uses. |
|
||||||
| scope | varchar(16) | | false | | | PromotionConnectionScope enum: "instance", "projects". Cannot change after creation. |
|
| scope | varchar(16) | | false | | | PromotionConnectionScope enum: "instance", "projects". Cannot change after creation. |
|
||||||
|
|
@ -42,6 +42,7 @@ erDiagram
|
||||||
|
|
||||||
"public.promotion_config" }o--|| "public.promotion_connection" : "FOREIGN KEY (#quot;connectionId#quot;) REFERENCES promotion_connection(id) ON DELETE CASCADE"
|
"public.promotion_config" }o--|| "public.promotion_connection" : "FOREIGN KEY (#quot;connectionId#quot;) REFERENCES promotion_connection(id) ON DELETE CASCADE"
|
||||||
"public.promotion_connection_project" }o--|| "public.promotion_connection" : "FOREIGN KEY (#quot;connectionId#quot;) REFERENCES promotion_connection(id) ON DELETE CASCADE"
|
"public.promotion_connection_project" }o--|| "public.promotion_connection" : "FOREIGN KEY (#quot;connectionId#quot;) REFERENCES promotion_connection(id) ON DELETE CASCADE"
|
||||||
|
"public.promotion_review" }o--o| "public.promotion_connection" : "FOREIGN KEY (#quot;connectionId#quot;) REFERENCES promotion_connection(id) ON DELETE SET NULL"
|
||||||
"public.promotion_connection" }o--|| "public.promotion_provider" : "FOREIGN KEY (#quot;providerId#quot;) REFERENCES promotion_provider(id) ON DELETE RESTRICT"
|
"public.promotion_connection" }o--|| "public.promotion_provider" : "FOREIGN KEY (#quot;providerId#quot;) REFERENCES promotion_provider(id) ON DELETE RESTRICT"
|
||||||
|
|
||||||
"public.promotion_connection" {
|
"public.promotion_connection" {
|
||||||
|
|
@ -68,6 +69,18 @@ erDiagram
|
||||||
varchar_36_ projectId FK
|
varchar_36_ projectId FK
|
||||||
timestamp_3__with_time_zone updatedAt
|
timestamp_3__with_time_zone updatedAt
|
||||||
}
|
}
|
||||||
|
"public.promotion_review" {
|
||||||
|
timestamp_3__with_time_zone approvedAt
|
||||||
|
uuid approvedById FK
|
||||||
|
varchar_36_ connectionId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
uuid id
|
||||||
|
timestamp_3__with_time_zone lastStateChangeAt
|
||||||
|
varchar_255_ remoteReviewId
|
||||||
|
varchar_32_ state
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
"public.promotion_provider" {
|
"public.promotion_provider" {
|
||||||
text auth
|
text auth
|
||||||
varchar_32_ authType
|
varchar_32_ authType
|
||||||
|
|
|
||||||
104
docs/generated/postgres-schema/public.promotion_review.md
generated
Normal file
104
docs/generated/postgres-schema/public.promotion_review.md
generated
Normal file
|
|
@ -0,0 +1,104 @@
|
||||||
|
# public.promotion_review
|
||||||
|
|
||||||
|
## Columns
|
||||||
|
|
||||||
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||||
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||||
|
| approvedAt | timestamp(3) with time zone | | true | | | When the n8n user approved the review. |
|
||||||
|
| approvedById | uuid | | true | | [public.user](public.user.md) | The one n8n user who approved the review in n8n. NULL until then. n8n does not copy an approver from the host. |
|
||||||
|
| connectionId | varchar(36) | | true | | [public.promotion_connection](public.promotion_connection.md) | The connection that remoteReviewId resolves through. NULL after the connection is deleted. |
|
||||||
|
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||||
|
| createdById | uuid | | true | | [public.user](public.user.md) | The n8n user whose Promote opened this review. NULL after that user is deleted. |
|
||||||
|
| id | uuid | | false | [public.promotion_run](public.promotion_run.md) | | |
|
||||||
|
| lastStateChangeAt | timestamp(3) with time zone | | true | | | Time of the latest state change. Covers every transition, including changes_requested and a reopened review. NULL until the first change. |
|
||||||
|
| remoteReviewId | varchar(255) | | true | | | Host reference for type. GitLab stores "\<projectId\>!\<iid\>". NULL when the review lives in n8n. |
|
||||||
|
| state | varchar(32) | 'open'::character varying | false | | | PromotionReviewState enum: "open", "changes_requested", "merged", "closed". "merged" and "closed" are terminal. |
|
||||||
|
| type | varchar(16) | | false | | | PromotionReviewType enum: "gitlab". |
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
| Name | Type | Definition |
|
||||||
|
| ---- | ---- | ---------- |
|
||||||
|
| CHK_promotion_review_state | CHECK | CHECK (((state)::text = ANY ((ARRAY['open'::character varying, 'changes_requested'::character varying, 'merged'::character varying, 'closed'::character varying])::text[]))) |
|
||||||
|
| CHK_promotion_review_type | CHECK | CHECK (((type)::text = 'gitlab'::text)) |
|
||||||
|
| FK_promotion_review_approvedById | FOREIGN KEY | FOREIGN KEY ("approvedById") REFERENCES "user"(id) ON DELETE SET NULL |
|
||||||
|
| FK_promotion_review_connectionId | FOREIGN KEY | FOREIGN KEY ("connectionId") REFERENCES promotion_connection(id) ON DELETE SET NULL |
|
||||||
|
| FK_promotion_review_createdById | FOREIGN KEY | FOREIGN KEY ("createdById") REFERENCES "user"(id) ON DELETE SET NULL |
|
||||||
|
| PK_fe93e2f1add228dc14d3330c8e5 | PRIMARY KEY | PRIMARY KEY (id) |
|
||||||
|
| promotion_review_createdAt_not_null | n | NOT NULL "createdAt" |
|
||||||
|
| promotion_review_id_not_null | n | NOT NULL id |
|
||||||
|
| promotion_review_state_not_null | n | NOT NULL state |
|
||||||
|
| promotion_review_type_not_null | n | NOT NULL type |
|
||||||
|
|
||||||
|
## Indexes
|
||||||
|
|
||||||
|
| Name | Definition |
|
||||||
|
| ---- | ---------- |
|
||||||
|
| IDX_82d6930410e9e6c7d04c515079 | CREATE INDEX "IDX_82d6930410e9e6c7d04c515079" ON public.promotion_review USING btree (state, "createdAt") |
|
||||||
|
| IDX_93e4ec34f4091a0333af0076b6 | CREATE INDEX "IDX_93e4ec34f4091a0333af0076b6" ON public.promotion_review USING btree ("connectionId") |
|
||||||
|
| IDX_promotion_review_connectionId_remoteReviewId | CREATE UNIQUE INDEX "IDX_promotion_review_connectionId_remoteReviewId" ON public.promotion_review USING btree ("connectionId", "remoteReviewId") WHERE ("remoteReviewId" IS NOT NULL) |
|
||||||
|
| PK_fe93e2f1add228dc14d3330c8e5 | CREATE UNIQUE INDEX "PK_fe93e2f1add228dc14d3330c8e5" ON public.promotion_review USING btree (id) |
|
||||||
|
|
||||||
|
## Relations
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
erDiagram
|
||||||
|
|
||||||
|
"public.promotion_review" }o--o| "public.user" : "FOREIGN KEY (#quot;approvedById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
|
"public.promotion_review" }o--o| "public.promotion_connection" : "FOREIGN KEY (#quot;connectionId#quot;) REFERENCES promotion_connection(id) ON DELETE SET NULL"
|
||||||
|
"public.promotion_review" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
|
"public.promotion_run" }o--o| "public.promotion_review" : "FOREIGN KEY (#quot;reviewId#quot;) REFERENCES promotion_review(id) ON DELETE SET NULL"
|
||||||
|
|
||||||
|
"public.promotion_review" {
|
||||||
|
timestamp_3__with_time_zone approvedAt
|
||||||
|
uuid approvedById FK
|
||||||
|
varchar_36_ connectionId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
uuid id
|
||||||
|
timestamp_3__with_time_zone lastStateChangeAt
|
||||||
|
varchar_255_ remoteReviewId
|
||||||
|
varchar_32_ state
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
|
"public.user" {
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
boolean disabled
|
||||||
|
varchar_255_ email
|
||||||
|
varchar_32_ firstName
|
||||||
|
uuid id
|
||||||
|
date lastActiveAt
|
||||||
|
varchar_32_ lastName
|
||||||
|
boolean mfaEnabled
|
||||||
|
text mfaRecoveryCodes
|
||||||
|
text mfaSecret
|
||||||
|
varchar_255_ password
|
||||||
|
json personalizationAnswers
|
||||||
|
varchar_128_ roleSlug FK
|
||||||
|
json settings
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
|
"public.promotion_connection" {
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
varchar_36_ id
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_36_ providerId FK
|
||||||
|
varchar_16_ scope
|
||||||
|
json target
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
|
"public.promotion_run" {
|
||||||
|
varchar_36_ configId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
json details
|
||||||
|
varchar_16_ direction
|
||||||
|
uuid id
|
||||||
|
uuid reviewId FK
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||||
100
docs/generated/postgres-schema/public.promotion_run.md
generated
Normal file
100
docs/generated/postgres-schema/public.promotion_run.md
generated
Normal file
|
|
@ -0,0 +1,100 @@
|
||||||
|
# public.promotion_run
|
||||||
|
|
||||||
|
## Columns
|
||||||
|
|
||||||
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||||
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||||
|
| configId | varchar(36) | | true | | [public.promotion_config](public.promotion_config.md) | The config this run used. NULL after the config is deleted. |
|
||||||
|
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||||
|
| createdById | uuid | | true | | [public.user](public.user.md) | The user who ran Promote or Apply. |
|
||||||
|
| details | json | | true | | | Payload for type. A git run stores schemaVersion, branchName and commitSha. NULL when the type has no details. |
|
||||||
|
| direction | varchar(16) | | false | | | PromotionDirection enum: "promote" pushes to the remote, "apply" imports from it. Copied from the config when the run is written. |
|
||||||
|
| id | uuid | | false | | | |
|
||||||
|
| reviewId | uuid | | true | | [public.promotion_review](public.promotion_review.md) | The review this run belongs to. NULL when the push has no review. Not unique: an amend adds another run. |
|
||||||
|
| type | varchar(16) | | false | | | PromotionRunType enum: "git". Git covers GitHub, GitLab and plain Git. |
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
| Name | Type | Definition |
|
||||||
|
| ---- | ---- | ---------- |
|
||||||
|
| CHK_promotion_run_direction | CHECK | CHECK (((direction)::text = ANY ((ARRAY['promote'::character varying, 'apply'::character varying])::text[]))) |
|
||||||
|
| CHK_promotion_run_type | CHECK | CHECK (((type)::text = 'git'::text)) |
|
||||||
|
| FK_promotion_run_configId | FOREIGN KEY | FOREIGN KEY ("configId") REFERENCES promotion_config(id) ON DELETE SET NULL |
|
||||||
|
| FK_promotion_run_createdById | FOREIGN KEY | FOREIGN KEY ("createdById") REFERENCES "user"(id) ON DELETE SET NULL |
|
||||||
|
| FK_promotion_run_reviewId | FOREIGN KEY | FOREIGN KEY ("reviewId") REFERENCES promotion_review(id) ON DELETE SET NULL |
|
||||||
|
| PK_f5b941d810bf2eb7a5f8327f446 | PRIMARY KEY | PRIMARY KEY (id) |
|
||||||
|
| promotion_run_createdAt_not_null | n | NOT NULL "createdAt" |
|
||||||
|
| promotion_run_direction_not_null | n | NOT NULL direction |
|
||||||
|
| promotion_run_id_not_null | n | NOT NULL id |
|
||||||
|
| promotion_run_type_not_null | n | NOT NULL type |
|
||||||
|
|
||||||
|
## Indexes
|
||||||
|
|
||||||
|
| Name | Definition |
|
||||||
|
| ---- | ---------- |
|
||||||
|
| IDX_5c00951cc85ac1bc6f120b1e69 | CREATE INDEX "IDX_5c00951cc85ac1bc6f120b1e69" ON public.promotion_run USING btree ("configId") |
|
||||||
|
| IDX_b24c3e6b803dc496c8702f12ab | CREATE INDEX "IDX_b24c3e6b803dc496c8702f12ab" ON public.promotion_run USING btree ("reviewId") |
|
||||||
|
| PK_f5b941d810bf2eb7a5f8327f446 | CREATE UNIQUE INDEX "PK_f5b941d810bf2eb7a5f8327f446" ON public.promotion_run USING btree (id) |
|
||||||
|
|
||||||
|
## Relations
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
erDiagram
|
||||||
|
|
||||||
|
"public.promotion_run" }o--o| "public.promotion_config" : "FOREIGN KEY (#quot;configId#quot;) REFERENCES promotion_config(id) ON DELETE SET NULL"
|
||||||
|
"public.promotion_run" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
|
"public.promotion_run" }o--o| "public.promotion_review" : "FOREIGN KEY (#quot;reviewId#quot;) REFERENCES promotion_review(id) ON DELETE SET NULL"
|
||||||
|
|
||||||
|
"public.promotion_run" {
|
||||||
|
varchar_36_ configId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
json details
|
||||||
|
varchar_16_ direction
|
||||||
|
uuid id
|
||||||
|
uuid reviewId FK
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
|
"public.promotion_config" {
|
||||||
|
varchar_36_ connectionId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
varchar_16_ direction
|
||||||
|
varchar_36_ id
|
||||||
|
varchar_128_ name
|
||||||
|
json settings
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
|
"public.user" {
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
boolean disabled
|
||||||
|
varchar_255_ email
|
||||||
|
varchar_32_ firstName
|
||||||
|
uuid id
|
||||||
|
date lastActiveAt
|
||||||
|
varchar_32_ lastName
|
||||||
|
boolean mfaEnabled
|
||||||
|
text mfaRecoveryCodes
|
||||||
|
text mfaSecret
|
||||||
|
varchar_255_ password
|
||||||
|
json personalizationAnswers
|
||||||
|
varchar_128_ roleSlug FK
|
||||||
|
json settings
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
|
"public.promotion_review" {
|
||||||
|
timestamp_3__with_time_zone approvedAt
|
||||||
|
uuid approvedById FK
|
||||||
|
varchar_36_ connectionId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
uuid id
|
||||||
|
timestamp_3__with_time_zone lastStateChangeAt
|
||||||
|
varchar_255_ remoteReviewId
|
||||||
|
varchar_32_ state
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||||
132
docs/generated/postgres-schema/public.skill.md
generated
Normal file
132
docs/generated/postgres-schema/public.skill.md
generated
Normal file
|
|
@ -0,0 +1,132 @@
|
||||||
|
# public.skill
|
||||||
|
|
||||||
|
## Columns
|
||||||
|
|
||||||
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||||
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||||
|
| agentId | varchar(36) | | true | | [public.agents](public.agents.md) | Set when only this agent can use the skill. projectId is then NULL: the agent holds the project |
|
||||||
|
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||||
|
| createdById | uuid | | true | | [public.user](public.user.md) | Author. NULL after the author is deleted |
|
||||||
|
| id | varchar(36) | | false | [public.agent_skill_dependency](public.agent_skill_dependency.md) [public.agent_version_skill_dependency](public.agent_version_skill_dependency.md) [public.skill_version](public.skill_version.md) | | skill_\<nanoid\>, the same format agents use |
|
||||||
|
| projectId | varchar(36) | | true | | [public.project](public.project.md) | Set for a project skill, team or personal. NULL otherwise |
|
||||||
|
| source | varchar(16) | | false | | | How the skill was created, set by the server: "ui" (the skills hub) or "agent" (the agent builder or the copy of agent skills) |
|
||||||
|
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
| Name | Type | Definition |
|
||||||
|
| ---- | ---- | ---------- |
|
||||||
|
| CHK_skill_single_target | CHECK | CHECK ((("agentId" IS NULL) OR ("projectId" IS NULL))) |
|
||||||
|
| FK_402ed37bff0d3134f6e782455ed | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
|
||||||
|
| FK_4de4501583cd1fcd6f5ea85f547 | FOREIGN KEY | FOREIGN KEY ("createdById") REFERENCES "user"(id) ON DELETE SET NULL |
|
||||||
|
| FK_7d4fb6af107e507d9a86293cf9d | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
|
||||||
|
| PK_a0d33334424e64fb78dc3ce7196 | PRIMARY KEY | PRIMARY KEY (id) |
|
||||||
|
| skill_createdAt_not_null | n | NOT NULL "createdAt" |
|
||||||
|
| skill_id_not_null | n | NOT NULL id |
|
||||||
|
| skill_source_not_null | n | NOT NULL source |
|
||||||
|
| skill_updatedAt_not_null | n | NOT NULL "updatedAt" |
|
||||||
|
|
||||||
|
## Indexes
|
||||||
|
|
||||||
|
| Name | Definition |
|
||||||
|
| ---- | ---------- |
|
||||||
|
| IDX_402ed37bff0d3134f6e782455e | CREATE INDEX "IDX_402ed37bff0d3134f6e782455e" ON public.skill USING btree ("projectId") |
|
||||||
|
| IDX_7d4fb6af107e507d9a86293cf9 | CREATE INDEX "IDX_7d4fb6af107e507d9a86293cf9" ON public.skill USING btree ("agentId") |
|
||||||
|
| PK_a0d33334424e64fb78dc3ce7196 | CREATE UNIQUE INDEX "PK_a0d33334424e64fb78dc3ce7196" ON public.skill USING btree (id) |
|
||||||
|
|
||||||
|
## Relations
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
erDiagram
|
||||||
|
|
||||||
|
"public.skill" }o--o| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||||
|
"public.skill" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
|
"public.agent_skill_dependency" }o--|| "public.skill" : "FOREIGN KEY (#quot;skillId#quot;) REFERENCES skill(id) ON DELETE CASCADE"
|
||||||
|
"public.agent_version_skill_dependency" }o--|| "public.skill" : "FOREIGN KEY (#quot;skillId#quot;) REFERENCES skill(id) ON DELETE CASCADE"
|
||||||
|
"public.skill_version" }o--|| "public.skill" : "FOREIGN KEY (#quot;skillId#quot;) REFERENCES skill(id) ON DELETE CASCADE"
|
||||||
|
"public.skill" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||||
|
|
||||||
|
"public.skill" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
varchar_36_ id
|
||||||
|
varchar_36_ projectId FK
|
||||||
|
varchar_16_ source
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
|
"public.agents" {
|
||||||
|
varchar_36_ activeVersionId FK
|
||||||
|
boolean availableInMCP
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
varchar_36_ id
|
||||||
|
json integrations
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_255_ projectId FK
|
||||||
|
integer revision
|
||||||
|
json schema
|
||||||
|
varchar_16_ scope
|
||||||
|
timestamp_3__with_time_zone setupCompletedAt
|
||||||
|
json skills
|
||||||
|
json tools
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
varchar_36_ versionId
|
||||||
|
}
|
||||||
|
"public.user" {
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
boolean disabled
|
||||||
|
varchar_255_ email
|
||||||
|
varchar_32_ firstName
|
||||||
|
uuid id
|
||||||
|
date lastActiveAt
|
||||||
|
varchar_32_ lastName
|
||||||
|
boolean mfaEnabled
|
||||||
|
text mfaRecoveryCodes
|
||||||
|
text mfaSecret
|
||||||
|
varchar_255_ password
|
||||||
|
json personalizationAnswers
|
||||||
|
varchar_128_ roleSlug FK
|
||||||
|
json settings
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
|
"public.agent_skill_dependency" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
uuid skillVersionId FK
|
||||||
|
}
|
||||||
|
"public.agent_version_skill_dependency" {
|
||||||
|
varchar_36_ agentVersionId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
uuid skillVersionId FK
|
||||||
|
}
|
||||||
|
"public.skill_version" {
|
||||||
|
varchar_64_ contentHash
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
varchar_1024_ description
|
||||||
|
json frontmatter
|
||||||
|
uuid id
|
||||||
|
text instructions
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
integer version
|
||||||
|
}
|
||||||
|
"public.project" {
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid creatorId FK
|
||||||
|
json customTelemetryTags
|
||||||
|
varchar_512_ description
|
||||||
|
json icon
|
||||||
|
varchar_36_ id
|
||||||
|
varchar_255_ name
|
||||||
|
varchar_36_ type
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||||
62
docs/generated/postgres-schema/public.skill_file.md
generated
Normal file
62
docs/generated/postgres-schema/public.skill_file.md
generated
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
# public.skill_file
|
||||||
|
|
||||||
|
## Columns
|
||||||
|
|
||||||
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||||
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||||
|
| content | text | | false | | | |
|
||||||
|
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||||
|
| path | varchar(512) | | false | | | Relative path, references/*.md in v1 |
|
||||||
|
| skillVersionId | uuid | | false | | [public.skill_version](public.skill_version.md) | |
|
||||||
|
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
| Name | Type | Definition |
|
||||||
|
| ---- | ---- | ---------- |
|
||||||
|
| FK_e9ab50b795ec8858702b7333d13 | FOREIGN KEY | FOREIGN KEY ("skillVersionId") REFERENCES skill_version(id) ON DELETE CASCADE |
|
||||||
|
| PK_160721f9e4c22026c16138af2a1 | PRIMARY KEY | PRIMARY KEY ("skillVersionId", path) |
|
||||||
|
| skill_file_content_not_null | n | NOT NULL content |
|
||||||
|
| skill_file_createdAt_not_null | n | NOT NULL "createdAt" |
|
||||||
|
| skill_file_path_not_null | n | NOT NULL path |
|
||||||
|
| skill_file_skillVersionId_not_null | n | NOT NULL "skillVersionId" |
|
||||||
|
| skill_file_updatedAt_not_null | n | NOT NULL "updatedAt" |
|
||||||
|
|
||||||
|
## Indexes
|
||||||
|
|
||||||
|
| Name | Definition |
|
||||||
|
| ---- | ---------- |
|
||||||
|
| PK_160721f9e4c22026c16138af2a1 | CREATE UNIQUE INDEX "PK_160721f9e4c22026c16138af2a1" ON public.skill_file USING btree ("skillVersionId", path) |
|
||||||
|
|
||||||
|
## Relations
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
erDiagram
|
||||||
|
|
||||||
|
"public.skill_file" }o--|| "public.skill_version" : "FOREIGN KEY (#quot;skillVersionId#quot;) REFERENCES skill_version(id) ON DELETE CASCADE"
|
||||||
|
|
||||||
|
"public.skill_file" {
|
||||||
|
text content
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
varchar_512_ path
|
||||||
|
uuid skillVersionId FK
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
|
"public.skill_version" {
|
||||||
|
varchar_64_ contentHash
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
varchar_1024_ description
|
||||||
|
json frontmatter
|
||||||
|
uuid id
|
||||||
|
text instructions
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
integer version
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||||
118
docs/generated/postgres-schema/public.skill_version.md
generated
Normal file
118
docs/generated/postgres-schema/public.skill_version.md
generated
Normal file
|
|
@ -0,0 +1,118 @@
|
||||||
|
# public.skill_version
|
||||||
|
|
||||||
|
## Columns
|
||||||
|
|
||||||
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||||
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||||
|
| contentHash | varchar(64) | | false | | | sha256 of name, description, instructions, frontmatter and files. Save creates no version when the content matches the latest one |
|
||||||
|
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||||
|
| createdById | uuid | | true | | [public.user](public.user.md) | Author. NULL after the author is deleted |
|
||||||
|
| description | varchar(1024) | | false | | | |
|
||||||
|
| frontmatter | json | | true | | | SKILL.md frontmatter fields other than name and description, e.g. allowed-tools |
|
||||||
|
| id | uuid | | false | [public.agent_skill_dependency](public.agent_skill_dependency.md) [public.agent_version_skill_dependency](public.agent_version_skill_dependency.md) [public.skill_file](public.skill_file.md) | | |
|
||||||
|
| instructions | text | | false | | | |
|
||||||
|
| name | varchar(128) | | false | | | Free-text skill name, as it was when this version was saved |
|
||||||
|
| skillId | varchar(36) | | false | | [public.skill](public.skill.md) | |
|
||||||
|
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||||
|
| version | integer | | false | | | 1..n per skill. A Save that changes the content adds one; none ever changes |
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
| Name | Type | Definition |
|
||||||
|
| ---- | ---- | ---------- |
|
||||||
|
| CHK_skill_version_version | CHECK | CHECK ((version > 0)) |
|
||||||
|
| FK_9565d0fbf32cd463f9b47c7adab | FOREIGN KEY | FOREIGN KEY ("createdById") REFERENCES "user"(id) ON DELETE SET NULL |
|
||||||
|
| FK_f87064c0a29efd2d5195328d91a | FOREIGN KEY | FOREIGN KEY ("skillId") REFERENCES skill(id) ON DELETE CASCADE |
|
||||||
|
| PK_05167d59ac7599128e22400172d | PRIMARY KEY | PRIMARY KEY (id) |
|
||||||
|
| UQ_93bb78a1eb4e0890fac6b69df95 | UNIQUE | UNIQUE ("skillId", version) |
|
||||||
|
| skill_version_contentHash_not_null | n | NOT NULL "contentHash" |
|
||||||
|
| skill_version_createdAt_not_null | n | NOT NULL "createdAt" |
|
||||||
|
| skill_version_description_not_null | n | NOT NULL description |
|
||||||
|
| skill_version_id_not_null | n | NOT NULL id |
|
||||||
|
| skill_version_instructions_not_null | n | NOT NULL instructions |
|
||||||
|
| skill_version_name_not_null | n | NOT NULL name |
|
||||||
|
| skill_version_skillId_not_null | n | NOT NULL "skillId" |
|
||||||
|
| skill_version_updatedAt_not_null | n | NOT NULL "updatedAt" |
|
||||||
|
| skill_version_version_not_null | n | NOT NULL version |
|
||||||
|
|
||||||
|
## Indexes
|
||||||
|
|
||||||
|
| Name | Definition |
|
||||||
|
| ---- | ---------- |
|
||||||
|
| PK_05167d59ac7599128e22400172d | CREATE UNIQUE INDEX "PK_05167d59ac7599128e22400172d" ON public.skill_version USING btree (id) |
|
||||||
|
| UQ_93bb78a1eb4e0890fac6b69df95 | CREATE UNIQUE INDEX "UQ_93bb78a1eb4e0890fac6b69df95" ON public.skill_version USING btree ("skillId", version) |
|
||||||
|
|
||||||
|
## Relations
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
erDiagram
|
||||||
|
|
||||||
|
"public.skill_version" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
|
"public.agent_skill_dependency" }o--o| "public.skill_version" : "FOREIGN KEY (#quot;skillVersionId#quot;) REFERENCES skill_version(id)"
|
||||||
|
"public.agent_version_skill_dependency" }o--|| "public.skill_version" : "FOREIGN KEY (#quot;skillVersionId#quot;) REFERENCES skill_version(id)"
|
||||||
|
"public.skill_file" }o--|| "public.skill_version" : "FOREIGN KEY (#quot;skillVersionId#quot;) REFERENCES skill_version(id) ON DELETE CASCADE"
|
||||||
|
"public.skill_version" }o--|| "public.skill" : "FOREIGN KEY (#quot;skillId#quot;) REFERENCES skill(id) ON DELETE CASCADE"
|
||||||
|
|
||||||
|
"public.skill_version" {
|
||||||
|
varchar_64_ contentHash
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
varchar_1024_ description
|
||||||
|
json frontmatter
|
||||||
|
uuid id
|
||||||
|
text instructions
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
integer version
|
||||||
|
}
|
||||||
|
"public.user" {
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
boolean disabled
|
||||||
|
varchar_255_ email
|
||||||
|
varchar_32_ firstName
|
||||||
|
uuid id
|
||||||
|
date lastActiveAt
|
||||||
|
varchar_32_ lastName
|
||||||
|
boolean mfaEnabled
|
||||||
|
text mfaRecoveryCodes
|
||||||
|
text mfaSecret
|
||||||
|
varchar_255_ password
|
||||||
|
json personalizationAnswers
|
||||||
|
varchar_128_ roleSlug FK
|
||||||
|
json settings
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
|
"public.agent_skill_dependency" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
uuid skillVersionId FK
|
||||||
|
}
|
||||||
|
"public.agent_version_skill_dependency" {
|
||||||
|
varchar_36_ agentVersionId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
uuid skillVersionId FK
|
||||||
|
}
|
||||||
|
"public.skill_file" {
|
||||||
|
text content
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
varchar_512_ path
|
||||||
|
uuid skillVersionId FK
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
|
"public.skill" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
varchar_36_ id
|
||||||
|
varchar_36_ projectId FK
|
||||||
|
varchar_16_ source
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||||
51
docs/generated/postgres-schema/public.user.md
generated
51
docs/generated/postgres-schema/public.user.md
generated
|
|
@ -8,7 +8,7 @@
|
||||||
| disabled | boolean | false | false | | | |
|
| disabled | boolean | false | false | | | |
|
||||||
| email | varchar(255) | | true | | | |
|
| email | varchar(255) | | true | | | |
|
||||||
| firstName | varchar(32) | | true | | | |
|
| firstName | varchar(32) | | true | | | |
|
||||||
| id | uuid | gen_random_uuid() | false | [public.activity_event](public.activity_event.md) [public.agent_eval_dataset](public.agent_eval_dataset.md) [public.agent_eval_rating](public.agent_eval_rating.md) [public.agent_eval_run](public.agent_eval_run.md) [public.agent_execution_threads](public.agent_execution_threads.md) [public.agent_history](public.agent_history.md) [public.ai_preference](public.ai_preference.md) [public.auth_identity](public.auth_identity.md) [public.chat_hub_agents](public.chat_hub_agents.md) [public.chat_hub_sessions](public.chat_hub_sessions.md) [public.chat_hub_tools](public.chat_hub_tools.md) [public.dynamic_credential_user_entry](public.dynamic_credential_user_entry.md) [public.evaluation_collection](public.evaluation_collection.md) [public.idempotency_key](public.idempotency_key.md) [public.instance_ai_mcp_registry_connections](public.instance_ai_mcp_registry_connections.md) [public.instance_ai_pending_confirmations](public.instance_ai_pending_confirmations.md) [public.instance_ai_thread_grants](public.instance_ai_thread_grants.md) [public.instance_ai_thread_tabs](public.instance_ai_thread_tabs.md) [public.migration_workflow_owner](public.migration_workflow_owner.md) [public.oauth_access_tokens](public.oauth_access_tokens.md) [public.oauth_authorization_codes](public.oauth_authorization_codes.md) [public.oauth_refresh_tokens](public.oauth_refresh_tokens.md) [public.oauth_user_consents](public.oauth_user_consents.md) [public.project](public.project.md) [public.project_relation](public.project_relation.md) [public.self_healing_result](public.self_healing_result.md) [public.trusted_source_identity](public.trusted_source_identity.md) [public.user_api_keys](public.user_api_keys.md) [public.user_favorites](public.user_favorites.md) [public.workflow_builder_session](public.workflow_builder_session.md) [public.workflow_publish_history](public.workflow_publish_history.md) [public.workflow_review_activity](public.workflow_review_activity.md) [public.workflow_review_activity_comment](public.workflow_review_activity_comment.md) [public.workflow_review_request](public.workflow_review_request.md) [public.workflow_review_request_authors](public.workflow_review_request_authors.md) [public.workflow_review_request_reviewers](public.workflow_review_request_reviewers.md) [public.workflow_suggestion](public.workflow_suggestion.md) [public.workflow_suggestion_activity](public.workflow_suggestion_activity.md) | | |
|
| id | uuid | gen_random_uuid() | false | [public.activity_event](public.activity_event.md) [public.agent_eval_dataset](public.agent_eval_dataset.md) [public.agent_eval_rating](public.agent_eval_rating.md) [public.agent_eval_run](public.agent_eval_run.md) [public.agent_execution_threads](public.agent_execution_threads.md) [public.agent_history](public.agent_history.md) [public.ai_preference](public.ai_preference.md) [public.auth_identity](public.auth_identity.md) [public.chat_hub_agents](public.chat_hub_agents.md) [public.chat_hub_sessions](public.chat_hub_sessions.md) [public.chat_hub_tools](public.chat_hub_tools.md) [public.dynamic_credential_user_entry](public.dynamic_credential_user_entry.md) [public.evaluation_collection](public.evaluation_collection.md) [public.idempotency_key](public.idempotency_key.md) [public.instance_ai_mcp_registry_connections](public.instance_ai_mcp_registry_connections.md) [public.instance_ai_pending_confirmations](public.instance_ai_pending_confirmations.md) [public.instance_ai_thread_grants](public.instance_ai_thread_grants.md) [public.instance_ai_thread_tabs](public.instance_ai_thread_tabs.md) [public.migration_workflow_owner](public.migration_workflow_owner.md) [public.oauth_access_tokens](public.oauth_access_tokens.md) [public.oauth_authorization_codes](public.oauth_authorization_codes.md) [public.oauth_refresh_tokens](public.oauth_refresh_tokens.md) [public.oauth_user_consents](public.oauth_user_consents.md) [public.project](public.project.md) [public.project_relation](public.project_relation.md) [public.promotion_review](public.promotion_review.md) [public.promotion_run](public.promotion_run.md) [public.self_healing_result](public.self_healing_result.md) [public.skill](public.skill.md) [public.skill_version](public.skill_version.md) [public.trusted_source_identity](public.trusted_source_identity.md) [public.user_api_keys](public.user_api_keys.md) [public.user_favorites](public.user_favorites.md) [public.workflow_builder_session](public.workflow_builder_session.md) [public.workflow_publish_history](public.workflow_publish_history.md) [public.workflow_review_activity](public.workflow_review_activity.md) [public.workflow_review_activity_comment](public.workflow_review_activity_comment.md) [public.workflow_review_request](public.workflow_review_request.md) [public.workflow_review_request_authors](public.workflow_review_request_authors.md) [public.workflow_review_request_reviewers](public.workflow_review_request_reviewers.md) [public.workflow_suggestion](public.workflow_suggestion.md) [public.workflow_suggestion_activity](public.workflow_suggestion_activity.md) | | |
|
||||||
| lastActiveAt | date | | true | | | |
|
| lastActiveAt | date | | true | | | |
|
||||||
| lastName | varchar(32) | | true | | | |
|
| lastName | varchar(32) | | true | | | |
|
||||||
| mfaEnabled | boolean | false | false | | | |
|
| mfaEnabled | boolean | false | false | | | |
|
||||||
|
|
@ -74,8 +74,13 @@ erDiagram
|
||||||
"public.oauth_user_consents" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
|
"public.oauth_user_consents" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
|
||||||
"public.project" }o--o| "public.user" : "FOREIGN KEY (#quot;creatorId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
"public.project" }o--o| "public.user" : "FOREIGN KEY (#quot;creatorId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
"public.project_relation" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
|
"public.project_relation" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
|
||||||
|
"public.promotion_review" }o--o| "public.user" : "FOREIGN KEY (#quot;approvedById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
|
"public.promotion_review" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
|
"public.promotion_run" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
"public.self_healing_result" }o--|| "public.user" : "FOREIGN KEY (#quot;backgroundUserId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
|
"public.self_healing_result" }o--|| "public.user" : "FOREIGN KEY (#quot;backgroundUserId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
|
||||||
"public.self_healing_result" }o--o| "public.user" : "FOREIGN KEY (#quot;dismissedById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
"public.self_healing_result" }o--o| "public.user" : "FOREIGN KEY (#quot;dismissedById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
|
"public.skill" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
|
"public.skill_version" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
|
||||||
"public.trusted_source_identity" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
|
"public.trusted_source_identity" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
|
||||||
"public.user_api_keys" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
|
"public.user_api_keys" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
|
||||||
"public.user_favorites" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
|
"public.user_favorites" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
|
||||||
|
|
@ -381,6 +386,28 @@ erDiagram
|
||||||
timestamp_3__with_time_zone updatedAt
|
timestamp_3__with_time_zone updatedAt
|
||||||
uuid userId FK
|
uuid userId FK
|
||||||
}
|
}
|
||||||
|
"public.promotion_review" {
|
||||||
|
timestamp_3__with_time_zone approvedAt
|
||||||
|
uuid approvedById FK
|
||||||
|
varchar_36_ connectionId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
uuid id
|
||||||
|
timestamp_3__with_time_zone lastStateChangeAt
|
||||||
|
varchar_255_ remoteReviewId
|
||||||
|
varchar_32_ state
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
|
"public.promotion_run" {
|
||||||
|
varchar_36_ configId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
json details
|
||||||
|
varchar_16_ direction
|
||||||
|
uuid id
|
||||||
|
uuid reviewId FK
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
"public.self_healing_result" {
|
"public.self_healing_result" {
|
||||||
uuid backgroundUserId FK
|
uuid backgroundUserId FK
|
||||||
timestamp_3__with_time_zone completedAt
|
timestamp_3__with_time_zone completedAt
|
||||||
|
|
@ -398,6 +425,28 @@ erDiagram
|
||||||
json usage
|
json usage
|
||||||
varchar_36_ workflowId FK
|
varchar_36_ workflowId FK
|
||||||
}
|
}
|
||||||
|
"public.skill" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
varchar_36_ id
|
||||||
|
varchar_36_ projectId FK
|
||||||
|
varchar_16_ source
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
}
|
||||||
|
"public.skill_version" {
|
||||||
|
varchar_64_ contentHash
|
||||||
|
timestamp_3__with_time_zone createdAt
|
||||||
|
uuid createdById FK
|
||||||
|
varchar_1024_ description
|
||||||
|
json frontmatter
|
||||||
|
uuid id
|
||||||
|
text instructions
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
timestamp_3__with_time_zone updatedAt
|
||||||
|
integer version
|
||||||
|
}
|
||||||
"public.trusted_source_identity" {
|
"public.trusted_source_identity" {
|
||||||
timestamp_3__with_time_zone createdAt
|
timestamp_3__with_time_zone createdAt
|
||||||
timestamp_3__with_time_zone lastSeenAt
|
timestamp_3__with_time_zone lastSeenAt
|
||||||
|
|
|
||||||
93
docs/generated/sqlite-schema/README.md
generated
93
docs/generated/sqlite-schema/README.md
generated
|
|
@ -29,12 +29,14 @@ Auto-generated from the SQLite migrations in @n8n/db. Do not edit by hand.
|
||||||
| [agent_message_queue](agent_message_queue.md) | 10 | | table |
|
| [agent_message_queue](agent_message_queue.md) | 10 | | table |
|
||||||
| [agent_plan](agent_plan.md) | 8 | | table |
|
| [agent_plan](agent_plan.md) | 8 | | table |
|
||||||
| [agent_plan_history](agent_plan_history.md) | 6 | | table |
|
| [agent_plan_history](agent_plan_history.md) | 6 | | table |
|
||||||
|
| [agent_skill_dependency](agent_skill_dependency.md) | 4 | | table |
|
||||||
| [agent_task_definition](agent_task_definition.md) | 8 | | table |
|
| [agent_task_definition](agent_task_definition.md) | 8 | | table |
|
||||||
| [agent_task_run_lock](agent_task_run_lock.md) | 6 | | table |
|
| [agent_task_run_lock](agent_task_run_lock.md) | 6 | | table |
|
||||||
| [agent_task_snapshot](agent_task_snapshot.md) | 9 | | table |
|
| [agent_task_snapshot](agent_task_snapshot.md) | 9 | | table |
|
||||||
| [agent_thread_grants](agent_thread_grants.md) | 4 | | table |
|
| [agent_thread_grants](agent_thread_grants.md) | 4 | | table |
|
||||||
|
| [agent_version_skill_dependency](agent_version_skill_dependency.md) | 4 | | table |
|
||||||
| [agent_workflow_dependency](agent_workflow_dependency.md) | 3 | | table |
|
| [agent_workflow_dependency](agent_workflow_dependency.md) | 3 | | table |
|
||||||
| [agents](agents.md) | 14 | | table |
|
| [agents](agents.md) | 15 | | table |
|
||||||
| [agents_memory_entries](agents_memory_entries.md) | 13 | | table |
|
| [agents_memory_entries](agents_memory_entries.md) | 13 | | table |
|
||||||
| [agents_memory_entry_candidates](agents_memory_entry_candidates.md) | 14 | | table |
|
| [agents_memory_entry_candidates](agents_memory_entry_candidates.md) | 14 | | table |
|
||||||
| [agents_memory_entry_locks](agents_memory_entry_locks.md) | 6 | | table |
|
| [agents_memory_entry_locks](agents_memory_entry_locks.md) | 6 | | table |
|
||||||
|
|
@ -119,6 +121,8 @@ Auto-generated from the SQLite migrations in @n8n/db. Do not edit by hand.
|
||||||
| [promotion_connection](promotion_connection.md) | 7 | | table |
|
| [promotion_connection](promotion_connection.md) | 7 | | table |
|
||||||
| [promotion_connection_project](promotion_connection_project.md) | 4 | | table |
|
| [promotion_connection_project](promotion_connection_project.md) | 4 | | table |
|
||||||
| [promotion_provider](promotion_provider.md) | 8 | | table |
|
| [promotion_provider](promotion_provider.md) | 8 | | table |
|
||||||
|
| [promotion_review](promotion_review.md) | 10 | | table |
|
||||||
|
| [promotion_run](promotion_run.md) | 8 | | table |
|
||||||
| [role](role.md) | 7 | | table |
|
| [role](role.md) | 7 | | table |
|
||||||
| [role_mapping_rule](role_mapping_rule.md) | 7 | | table |
|
| [role_mapping_rule](role_mapping_rule.md) | 7 | | table |
|
||||||
| [role_mapping_rule_project](role_mapping_rule_project.md) | 2 | | table |
|
| [role_mapping_rule_project](role_mapping_rule_project.md) | 2 | | table |
|
||||||
|
|
@ -131,6 +135,9 @@ Auto-generated from the SQLite migrations in @n8n/db. Do not edit by hand.
|
||||||
| [settings](settings.md) | 3 | | table |
|
| [settings](settings.md) | 3 | | table |
|
||||||
| [shared_credentials](shared_credentials.md) | 5 | | table |
|
| [shared_credentials](shared_credentials.md) | 5 | | table |
|
||||||
| [shared_workflow](shared_workflow.md) | 5 | | table |
|
| [shared_workflow](shared_workflow.md) | 5 | | table |
|
||||||
|
| [skill](skill.md) | 7 | | table |
|
||||||
|
| [skill_file](skill_file.md) | 5 | | table |
|
||||||
|
| [skill_version](skill_version.md) | 11 | | table |
|
||||||
| [tag_entity](tag_entity.md) | 4 | | table |
|
| [tag_entity](tag_entity.md) | 4 | | table |
|
||||||
| [test_case_execution](test_case_execution.md) | 16 | | table |
|
| [test_case_execution](test_case_execution.md) | 16 | | table |
|
||||||
| [test_run](test_run.md) | 16 | | table |
|
| [test_run](test_run.md) | 16 | | table |
|
||||||
|
|
@ -205,13 +212,19 @@ erDiagram
|
||||||
"agent_message_queue" }o--o| "agent_execution" : "FOREIGN KEY (steeringExecutionId) REFERENCES agent_execution (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE"
|
"agent_message_queue" }o--o| "agent_execution" : "FOREIGN KEY (steeringExecutionId) REFERENCES agent_execution (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE"
|
||||||
"agent_plan" }o--|| "agent_execution_threads" : "FOREIGN KEY (threadId) REFERENCES agent_execution_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agent_plan" }o--|| "agent_execution_threads" : "FOREIGN KEY (threadId) REFERENCES agent_execution_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agent_plan_history" |o--|| "agent_plan" : "FOREIGN KEY (planId) REFERENCES agent_plan (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agent_plan_history" |o--|| "agent_plan" : "FOREIGN KEY (planId) REFERENCES agent_plan (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"agent_skill_dependency" }o--o| "skill_version" : "FOREIGN KEY (skillVersionId) REFERENCES skill_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE"
|
||||||
|
"agent_skill_dependency" |o--|| "skill" : "FOREIGN KEY (skillId) REFERENCES skill (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"agent_skill_dependency" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agent_task_definition" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agent_task_definition" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agent_task_run_lock" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agent_task_run_lock" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agent_task_snapshot" |o--|| "agent_history" : "FOREIGN KEY (versionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agent_task_snapshot" |o--|| "agent_history" : "FOREIGN KEY (versionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agent_thread_grants" |o--|| "agent_execution_threads" : "FOREIGN KEY (threadId) REFERENCES agent_execution_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agent_thread_grants" |o--|| "agent_execution_threads" : "FOREIGN KEY (threadId) REFERENCES agent_execution_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"agent_version_skill_dependency" }o--|| "skill_version" : "FOREIGN KEY (skillVersionId) REFERENCES skill_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE"
|
||||||
|
"agent_version_skill_dependency" |o--|| "skill" : "FOREIGN KEY (skillId) REFERENCES skill (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"agent_version_skill_dependency" |o--|| "agent_history" : "FOREIGN KEY (agentVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agent_workflow_dependency" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agent_workflow_dependency" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agent_workflow_dependency" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agent_workflow_dependency" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agents" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agents" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agents" }o--o| "agent_history" : "FOREIGN KEY (activeVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
"agents" }o--o| "agent_history" : "FOREIGN KEY (activeVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
"agents_memory_entries" }o--o| "agents_memory_entries" : "FOREIGN KEY (supersededBy) REFERENCES agents_memory_entries (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE"
|
"agents_memory_entries" }o--o| "agents_memory_entries" : "FOREIGN KEY (supersededBy) REFERENCES agents_memory_entries (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE"
|
||||||
"agents_memory_entries" }o--|| "agents_resources" : "FOREIGN KEY (resourceId) REFERENCES agents_resources (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agents_memory_entries" }o--|| "agents_resources" : "FOREIGN KEY (resourceId) REFERENCES agents_resources (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
|
@ -336,6 +349,12 @@ erDiagram
|
||||||
"promotion_connection" }o--|| "promotion_provider" : "FOREIGN KEY (providerId) REFERENCES promotion_provider (id) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE"
|
"promotion_connection" }o--|| "promotion_provider" : "FOREIGN KEY (providerId) REFERENCES promotion_provider (id) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE"
|
||||||
"promotion_connection_project" }o--|| "promotion_connection" : "FOREIGN KEY (connectionId) REFERENCES promotion_connection (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"promotion_connection_project" }o--|| "promotion_connection" : "FOREIGN KEY (connectionId) REFERENCES promotion_connection (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"promotion_connection_project" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"promotion_connection_project" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"promotion_review" }o--o| "user" : "FOREIGN KEY (approvedById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
"promotion_review" }o--o| "user" : "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
"promotion_review" }o--o| "promotion_connection" : "FOREIGN KEY (connectionId) REFERENCES promotion_connection (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
"promotion_run" }o--o| "promotion_review" : "FOREIGN KEY (reviewId) REFERENCES promotion_review (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
"promotion_run" }o--o| "user" : "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
"promotion_run" }o--o| "promotion_config" : "FOREIGN KEY (configId) REFERENCES promotion_config (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
"role_mapping_rule" }o--|| "role" : "FOREIGN KEY (role) REFERENCES role (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE"
|
"role_mapping_rule" }o--|| "role" : "FOREIGN KEY (role) REFERENCES role (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE"
|
||||||
"role_mapping_rule_project" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"role_mapping_rule_project" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"role_mapping_rule_project" |o--|| "role_mapping_rule" : "FOREIGN KEY (roleMappingRuleId) REFERENCES role_mapping_rule (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"role_mapping_rule_project" |o--|| "role_mapping_rule" : "FOREIGN KEY (roleMappingRuleId) REFERENCES role_mapping_rule (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
|
@ -351,6 +370,12 @@ erDiagram
|
||||||
"shared_credentials" |o--|| "credentials_entity" : "FOREIGN KEY (credentialsId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"shared_credentials" |o--|| "credentials_entity" : "FOREIGN KEY (credentialsId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"shared_workflow" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"shared_workflow" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"shared_workflow" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"shared_workflow" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"skill" }o--o| "user" : "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
"skill" }o--o| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"skill" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"skill_file" |o--|| "skill_version" : "FOREIGN KEY (skillVersionId) REFERENCES skill_version (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"skill_version" }o--o| "user" : "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
"skill_version" }o--|| "skill" : "FOREIGN KEY (skillId) REFERENCES skill (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"test_case_execution" }o--|| "test_run" : "FOREIGN KEY (testRunId) REFERENCES test_run (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"test_case_execution" }o--|| "test_run" : "FOREIGN KEY (testRunId) REFERENCES test_run (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (pastExecutionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
"test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (pastExecutionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
"test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
"test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
|
@ -665,6 +690,12 @@ erDiagram
|
||||||
varchar planId PK
|
varchar planId PK
|
||||||
INTEGER revision PK
|
INTEGER revision PK
|
||||||
}
|
}
|
||||||
|
"agent_skill_dependency" {
|
||||||
|
varchar_36_ agentId PK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar_36_ skillId PK
|
||||||
|
varchar skillVersionId FK
|
||||||
|
}
|
||||||
"agent_task_definition" {
|
"agent_task_definition" {
|
||||||
varchar_36_ agentId FK
|
varchar_36_ agentId FK
|
||||||
datetime_3_ createdAt
|
datetime_3_ createdAt
|
||||||
|
|
@ -700,6 +731,12 @@ erDiagram
|
||||||
varchar_128_ threadId PK
|
varchar_128_ threadId PK
|
||||||
datetime_3_ updatedAt
|
datetime_3_ updatedAt
|
||||||
}
|
}
|
||||||
|
"agent_version_skill_dependency" {
|
||||||
|
varchar_36_ agentVersionId PK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar_36_ skillId PK
|
||||||
|
varchar skillVersionId FK
|
||||||
|
}
|
||||||
"agent_workflow_dependency" {
|
"agent_workflow_dependency" {
|
||||||
varchar_36_ agentId PK
|
varchar_36_ agentId PK
|
||||||
datetime_3_ createdAt
|
datetime_3_ createdAt
|
||||||
|
|
@ -715,6 +752,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
@ -1513,6 +1551,28 @@ erDiagram
|
||||||
varchar_32_ type
|
varchar_32_ type
|
||||||
datetime_3_ updatedAt
|
datetime_3_ updatedAt
|
||||||
}
|
}
|
||||||
|
"promotion_review" {
|
||||||
|
datetime_3_ approvedAt
|
||||||
|
varchar approvedById FK
|
||||||
|
varchar_36_ connectionId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar id PK
|
||||||
|
datetime_3_ lastStateChangeAt
|
||||||
|
varchar_255_ remoteReviewId
|
||||||
|
varchar_32_ state
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
|
"promotion_run" {
|
||||||
|
varchar_36_ configId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
TEXT details
|
||||||
|
varchar_16_ direction
|
||||||
|
varchar id PK
|
||||||
|
varchar reviewId FK
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
"role" {
|
"role" {
|
||||||
datetime_3_ createdAt
|
datetime_3_ createdAt
|
||||||
TEXT description
|
TEXT description
|
||||||
|
|
@ -1637,6 +1697,35 @@ erDiagram
|
||||||
datetime_3_ updatedAt
|
datetime_3_ updatedAt
|
||||||
varchar_36_ workflowId PK
|
varchar_36_ workflowId PK
|
||||||
}
|
}
|
||||||
|
"skill" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar_36_ id PK
|
||||||
|
varchar_36_ projectId FK
|
||||||
|
varchar_16_ source
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
|
"skill_file" {
|
||||||
|
TEXT content
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar_512_ path PK
|
||||||
|
varchar skillVersionId PK
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
|
"skill_version" {
|
||||||
|
varchar_64_ contentHash
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar_1024_ description
|
||||||
|
TEXT frontmatter
|
||||||
|
varchar id PK
|
||||||
|
TEXT instructions
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
INTEGER version
|
||||||
|
}
|
||||||
"tag_entity" {
|
"tag_entity" {
|
||||||
datetime_3_ createdAt
|
datetime_3_ createdAt
|
||||||
varchar_36_ id PK
|
varchar_36_ id PK
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
1
docs/generated/sqlite-schema/agent_files.md
generated
1
docs/generated/sqlite-schema/agent_files.md
generated
|
|
@ -73,6 +73,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
10
docs/generated/sqlite-schema/agent_history.md
generated
10
docs/generated/sqlite-schema/agent_history.md
generated
|
|
@ -23,7 +23,7 @@ CREATE TABLE "agent_history" ("versionId" varchar(36) PRIMARY KEY NOT NULL, "age
|
||||||
| skills | TEXT | | true | | | |
|
| skills | TEXT | | true | | | |
|
||||||
| tools | TEXT | | true | | | |
|
| tools | TEXT | | true | | | |
|
||||||
| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
||||||
| versionId | varchar(36) | | false | [agent_execution_threads](agent_execution_threads.md) [agent_task_snapshot](agent_task_snapshot.md) [agents](agents.md) | | |
|
| versionId | varchar(36) | | false | [agent_execution_threads](agent_execution_threads.md) [agent_task_snapshot](agent_task_snapshot.md) [agent_version_skill_dependency](agent_version_skill_dependency.md) [agents](agents.md) | | |
|
||||||
|
|
||||||
## Constraints
|
## Constraints
|
||||||
|
|
||||||
|
|
@ -50,6 +50,7 @@ erDiagram
|
||||||
"agent_history" }o--o| "user" : "FOREIGN KEY (publishedById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
"agent_history" }o--o| "user" : "FOREIGN KEY (publishedById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
"agent_execution_threads" }o--o| "agent_history" : "FOREIGN KEY (taskVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
"agent_execution_threads" }o--o| "agent_history" : "FOREIGN KEY (taskVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
"agent_task_snapshot" |o--|| "agent_history" : "FOREIGN KEY (versionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agent_task_snapshot" |o--|| "agent_history" : "FOREIGN KEY (versionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"agent_version_skill_dependency" |o--|| "agent_history" : "FOREIGN KEY (agentVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agents" }o--o| "agent_history" : "FOREIGN KEY (activeVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
"agents" }o--o| "agent_history" : "FOREIGN KEY (activeVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
|
||||||
"agent_history" {
|
"agent_history" {
|
||||||
|
|
@ -73,6 +74,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
@ -128,6 +130,12 @@ erDiagram
|
||||||
datetime_3_ updatedAt
|
datetime_3_ updatedAt
|
||||||
varchar_36_ versionId PK
|
varchar_36_ versionId PK
|
||||||
}
|
}
|
||||||
|
"agent_version_skill_dependency" {
|
||||||
|
varchar_36_ agentVersionId PK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar_36_ skillId PK
|
||||||
|
varchar skillVersionId FK
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
99
docs/generated/sqlite-schema/agent_skill_dependency.md
generated
Normal file
99
docs/generated/sqlite-schema/agent_skill_dependency.md
generated
Normal file
|
|
@ -0,0 +1,99 @@
|
||||||
|
# agent_skill_dependency
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Table Definition</strong></summary>
|
||||||
|
|
||||||
|
```sql
|
||||||
|
CREATE TABLE "agent_skill_dependency" ("agentId" varchar(36) NOT NULL, "skillId" varchar(36) NOT NULL, "skillVersionId" varchar, "createdAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT "FK_72325bb13511a51847c53fcb377" FOREIGN KEY ("agentId") REFERENCES "agents" ("id") ON DELETE CASCADE, CONSTRAINT "FK_068f21aefba31ae621482f396dc" FOREIGN KEY ("skillId") REFERENCES "skill" ("id") ON DELETE CASCADE, CONSTRAINT "FK_7676571bd6f41d9e32f0d066fe9" FOREIGN KEY ("skillVersionId") REFERENCES "skill_version" ("id") ON DELETE NO ACTION, PRIMARY KEY ("agentId", "skillId"))
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Columns
|
||||||
|
|
||||||
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||||
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||||
|
| agentId | varchar(36) | | false | | [agents](agents.md) | |
|
||||||
|
| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
||||||
|
| skillId | varchar(36) | | false | | [skill](skill.md) | |
|
||||||
|
| skillVersionId | varchar | | true | | [skill_version](skill_version.md) | |
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
| Name | Type | Definition |
|
||||||
|
| ---- | ---- | ---------- |
|
||||||
|
| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (skillVersionId) REFERENCES skill_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE |
|
||||||
|
| - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (skillId) REFERENCES skill (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
|
||||||
|
| - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
|
||||||
|
| agentId | PRIMARY KEY | PRIMARY KEY (agentId) |
|
||||||
|
| skillId | PRIMARY KEY | PRIMARY KEY (skillId) |
|
||||||
|
| sqlite_autoindex_agent_skill_dependency_1 | PRIMARY KEY | PRIMARY KEY (agentId, skillId) |
|
||||||
|
|
||||||
|
## Indexes
|
||||||
|
|
||||||
|
| Name | Definition |
|
||||||
|
| ---- | ---------- |
|
||||||
|
| IDX_068f21aefba31ae621482f396d | CREATE INDEX "IDX_068f21aefba31ae621482f396d" ON "agent_skill_dependency" ("skillId") |
|
||||||
|
| sqlite_autoindex_agent_skill_dependency_1 | PRIMARY KEY (agentId, skillId) |
|
||||||
|
|
||||||
|
## Relations
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
erDiagram
|
||||||
|
|
||||||
|
"agent_skill_dependency" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"agent_skill_dependency" |o--|| "skill" : "FOREIGN KEY (skillId) REFERENCES skill (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"agent_skill_dependency" }o--o| "skill_version" : "FOREIGN KEY (skillVersionId) REFERENCES skill_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE"
|
||||||
|
|
||||||
|
"agent_skill_dependency" {
|
||||||
|
varchar_36_ agentId PK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar_36_ skillId PK
|
||||||
|
varchar skillVersionId FK
|
||||||
|
}
|
||||||
|
"agents" {
|
||||||
|
varchar_36_ activeVersionId FK
|
||||||
|
boolean availableInMCP
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar_36_ id PK
|
||||||
|
TEXT integrations
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_255_ projectId FK
|
||||||
|
INTEGER revision
|
||||||
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
|
datetime_3_ setupCompletedAt
|
||||||
|
TEXT skills
|
||||||
|
TEXT tools
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
varchar_36_ versionId
|
||||||
|
}
|
||||||
|
"skill" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar_36_ id PK
|
||||||
|
varchar_36_ projectId FK
|
||||||
|
varchar_16_ source
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
|
"skill_version" {
|
||||||
|
varchar_64_ contentHash
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar_1024_ description
|
||||||
|
TEXT frontmatter
|
||||||
|
varchar id PK
|
||||||
|
TEXT instructions
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
INTEGER version
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||||
|
|
@ -66,6 +66,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
94
docs/generated/sqlite-schema/agent_version_skill_dependency.md
generated
Normal file
94
docs/generated/sqlite-schema/agent_version_skill_dependency.md
generated
Normal file
|
|
@ -0,0 +1,94 @@
|
||||||
|
# agent_version_skill_dependency
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Table Definition</strong></summary>
|
||||||
|
|
||||||
|
```sql
|
||||||
|
CREATE TABLE "agent_version_skill_dependency" ("agentVersionId" varchar(36) NOT NULL, "skillId" varchar(36) NOT NULL, "skillVersionId" varchar NOT NULL, "createdAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT "FK_97472baf9196d914d9cd9de6201" FOREIGN KEY ("agentVersionId") REFERENCES "agent_history" ("versionId") ON DELETE CASCADE, CONSTRAINT "FK_c494292243a7e510acd0331c3d1" FOREIGN KEY ("skillId") REFERENCES "skill" ("id") ON DELETE CASCADE, CONSTRAINT "FK_df63badfd7d3f2aa622ece471c4" FOREIGN KEY ("skillVersionId") REFERENCES "skill_version" ("id") ON DELETE NO ACTION, PRIMARY KEY ("agentVersionId", "skillId"))
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Columns
|
||||||
|
|
||||||
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||||
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||||
|
| agentVersionId | varchar(36) | | false | | [agent_history](agent_history.md) | |
|
||||||
|
| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
||||||
|
| skillId | varchar(36) | | false | | [skill](skill.md) | |
|
||||||
|
| skillVersionId | varchar | | false | | [skill_version](skill_version.md) | |
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
| Name | Type | Definition |
|
||||||
|
| ---- | ---- | ---------- |
|
||||||
|
| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (skillVersionId) REFERENCES skill_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE |
|
||||||
|
| - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (skillId) REFERENCES skill (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
|
||||||
|
| - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (agentVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
|
||||||
|
| agentVersionId | PRIMARY KEY | PRIMARY KEY (agentVersionId) |
|
||||||
|
| skillId | PRIMARY KEY | PRIMARY KEY (skillId) |
|
||||||
|
| sqlite_autoindex_agent_version_skill_dependency_1 | PRIMARY KEY | PRIMARY KEY (agentVersionId, skillId) |
|
||||||
|
|
||||||
|
## Indexes
|
||||||
|
|
||||||
|
| Name | Definition |
|
||||||
|
| ---- | ---------- |
|
||||||
|
| IDX_c494292243a7e510acd0331c3d | CREATE INDEX "IDX_c494292243a7e510acd0331c3d" ON "agent_version_skill_dependency" ("skillId") |
|
||||||
|
| IDX_df63badfd7d3f2aa622ece471c | CREATE INDEX "IDX_df63badfd7d3f2aa622ece471c" ON "agent_version_skill_dependency" ("skillVersionId") |
|
||||||
|
| sqlite_autoindex_agent_version_skill_dependency_1 | PRIMARY KEY (agentVersionId, skillId) |
|
||||||
|
|
||||||
|
## Relations
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
erDiagram
|
||||||
|
|
||||||
|
"agent_version_skill_dependency" |o--|| "agent_history" : "FOREIGN KEY (agentVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"agent_version_skill_dependency" |o--|| "skill" : "FOREIGN KEY (skillId) REFERENCES skill (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"agent_version_skill_dependency" }o--|| "skill_version" : "FOREIGN KEY (skillVersionId) REFERENCES skill_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE"
|
||||||
|
|
||||||
|
"agent_version_skill_dependency" {
|
||||||
|
varchar_36_ agentVersionId PK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar_36_ skillId PK
|
||||||
|
varchar skillVersionId FK
|
||||||
|
}
|
||||||
|
"agent_history" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
varchar_255_ author
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar publishedById FK
|
||||||
|
TEXT schema
|
||||||
|
TEXT skills
|
||||||
|
TEXT tools
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
varchar_36_ versionId PK
|
||||||
|
}
|
||||||
|
"skill" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar_36_ id PK
|
||||||
|
varchar_36_ projectId FK
|
||||||
|
varchar_16_ source
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
|
"skill_version" {
|
||||||
|
varchar_64_ contentHash
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar_1024_ description
|
||||||
|
TEXT frontmatter
|
||||||
|
varchar id PK
|
||||||
|
TEXT instructions
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
INTEGER version
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||||
|
|
@ -59,6 +59,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
29
docs/generated/sqlite-schema/agents.md
generated
29
docs/generated/sqlite-schema/agents.md
generated
|
|
@ -6,7 +6,7 @@
|
||||||
<summary><strong>Table Definition</strong></summary>
|
<summary><strong>Table Definition</strong></summary>
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
CREATE TABLE "agents" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" varchar(128) NOT NULL, "projectId" varchar(255) NOT NULL, "integrations" text NOT NULL DEFAULT ('[]'), "schema" text, "tools" text NOT NULL DEFAULT ('{}'), "skills" text NOT NULL DEFAULT ('{}'), "versionId" varchar(36), "createdAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), "updatedAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), "activeVersionId" varchar(36), "availableInMCP" boolean NOT NULL DEFAULT (false), "setupCompletedAt" datetime(3), "revision" integer NOT NULL DEFAULT 0, CONSTRAINT "FK_940597dfe9753375309ce6aeea0" FOREIGN KEY ("activeVersionId") REFERENCES "agent_history" ("versionId") ON DELETE SET NULL ON UPDATE NO ACTION, CONSTRAINT "FK_a30d560207c4071d98aa03c179c" FOREIGN KEY ("projectId") REFERENCES "project" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)
|
CREATE TABLE "agents" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" varchar(128) NOT NULL, "projectId" varchar(255), "integrations" text NOT NULL DEFAULT ('[]'), "schema" text, "tools" text NOT NULL DEFAULT ('{}'), "skills" text NOT NULL DEFAULT ('{}'), "versionId" varchar(36), "createdAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), "updatedAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), "activeVersionId" varchar(36), "availableInMCP" boolean NOT NULL DEFAULT (false), "setupCompletedAt" datetime(3), "revision" integer NOT NULL DEFAULT (0), "scope" varchar(16) NOT NULL DEFAULT ('project'), CONSTRAINT "CHK_agents_scope" CHECK (("scope" IN ('project', 'instance'))), CONSTRAINT "CHK_agents_scope_project" CHECK (("scope" = 'instance') = ("projectId" IS NULL)), CONSTRAINT "FK_940597dfe9753375309ce6aeea0" FOREIGN KEY ("activeVersionId") REFERENCES "agent_history" ("versionId") ON DELETE SET NULL ON UPDATE NO ACTION, CONSTRAINT "FK_a30d560207c4071d98aa03c179c" FOREIGN KEY ("projectId") REFERENCES "project" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
@ -18,12 +18,13 @@ CREATE TABLE "agents" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" varchar(128
|
||||||
| activeVersionId | varchar(36) | | true | | [agent_history](agent_history.md) | |
|
| activeVersionId | varchar(36) | | true | | [agent_history](agent_history.md) | |
|
||||||
| availableInMCP | boolean | false | false | | | |
|
| availableInMCP | boolean | false | false | | | |
|
||||||
| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
||||||
| id | varchar(36) | | false | [agent_background_job](agent_background_job.md) [agent_channel_status](agent_channel_status.md) [agent_chat_attachments](agent_chat_attachments.md) [agent_chat_subscriptions](agent_chat_subscriptions.md) [agent_checkpoints](agent_checkpoints.md) [agent_credential_dependency](agent_credential_dependency.md) [agent_eval_dataset](agent_eval_dataset.md) [agent_execution_threads](agent_execution_threads.md) [agent_files](agent_files.md) [agent_history](agent_history.md) [agent_task_definition](agent_task_definition.md) [agent_task_run_lock](agent_task_run_lock.md) [agent_workflow_dependency](agent_workflow_dependency.md) [agents_memory_entries](agents_memory_entries.md) [agents_memory_entry_candidates](agents_memory_entry_candidates.md) [agents_memory_entry_locks](agents_memory_entry_locks.md) [agents_memory_entry_sources](agents_memory_entry_sources.md) [agents_observation_cursors](agents_observation_cursors.md) [agents_observation_locks](agents_observation_locks.md) [agents_observations](agents_observations.md) | | |
|
| id | varchar(36) | | false | [agent_background_job](agent_background_job.md) [agent_channel_status](agent_channel_status.md) [agent_chat_attachments](agent_chat_attachments.md) [agent_chat_subscriptions](agent_chat_subscriptions.md) [agent_checkpoints](agent_checkpoints.md) [agent_credential_dependency](agent_credential_dependency.md) [agent_eval_dataset](agent_eval_dataset.md) [agent_execution_threads](agent_execution_threads.md) [agent_files](agent_files.md) [agent_history](agent_history.md) [agent_skill_dependency](agent_skill_dependency.md) [agent_task_definition](agent_task_definition.md) [agent_task_run_lock](agent_task_run_lock.md) [agent_workflow_dependency](agent_workflow_dependency.md) [agents_memory_entries](agents_memory_entries.md) [agents_memory_entry_candidates](agents_memory_entry_candidates.md) [agents_memory_entry_locks](agents_memory_entry_locks.md) [agents_memory_entry_sources](agents_memory_entry_sources.md) [agents_observation_cursors](agents_observation_cursors.md) [agents_observation_locks](agents_observation_locks.md) [agents_observations](agents_observations.md) [skill](skill.md) | | |
|
||||||
| integrations | TEXT | '[]' | false | | | |
|
| integrations | TEXT | '[]' | false | | | |
|
||||||
| name | varchar(128) | | false | | | |
|
| name | varchar(128) | | false | | | |
|
||||||
| projectId | varchar(255) | | false | | [project](project.md) | |
|
| projectId | varchar(255) | | true | | [project](project.md) | |
|
||||||
| revision | INTEGER | 0 | false | | | |
|
| revision | INTEGER | 0 | false | | | |
|
||||||
| schema | TEXT | | true | | | |
|
| schema | TEXT | | true | | | |
|
||||||
|
| scope | varchar(16) | 'project' | false | | | |
|
||||||
| setupCompletedAt | datetime(3) | | true | | | |
|
| setupCompletedAt | datetime(3) | | true | | | |
|
||||||
| skills | TEXT | '{}' | false | | | |
|
| skills | TEXT | '{}' | false | | | |
|
||||||
| tools | TEXT | '{}' | false | | | |
|
| tools | TEXT | '{}' | false | | | |
|
||||||
|
|
@ -34,6 +35,8 @@ CREATE TABLE "agents" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" varchar(128
|
||||||
|
|
||||||
| Name | Type | Definition |
|
| Name | Type | Definition |
|
||||||
| ---- | ---- | ---------- |
|
| ---- | ---- | ---------- |
|
||||||
|
| - | CHECK | CHECK (("scope" IN ('project', 'instance'))) |
|
||||||
|
| - | CHECK | CHECK (("scope" = 'instance') = ("projectId" IS NULL)) |
|
||||||
| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
|
| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
|
||||||
| - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (activeVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE |
|
| - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (activeVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE |
|
||||||
| id | PRIMARY KEY | PRIMARY KEY (id) |
|
| id | PRIMARY KEY | PRIMARY KEY (id) |
|
||||||
|
|
@ -63,6 +66,7 @@ erDiagram
|
||||||
"agent_execution_threads" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agent_execution_threads" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agent_files" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agent_files" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agent_history" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agent_history" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"agent_skill_dependency" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agent_task_definition" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agent_task_definition" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agent_task_run_lock" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agent_task_run_lock" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agent_workflow_dependency" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agent_workflow_dependency" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
|
@ -73,7 +77,8 @@ erDiagram
|
||||||
"agents_observation_cursors" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agents_observation_cursors" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agents_observation_locks" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agents_observation_locks" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agents_observations" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agents_observations" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agents" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"skill" }o--o| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"agents" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
|
||||||
"agents" {
|
"agents" {
|
||||||
varchar_36_ activeVersionId FK
|
varchar_36_ activeVersionId FK
|
||||||
|
|
@ -85,6 +90,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
@ -218,6 +224,12 @@ erDiagram
|
||||||
varchar_2_ storedAt
|
varchar_2_ storedAt
|
||||||
datetime_3_ updatedAt
|
datetime_3_ updatedAt
|
||||||
}
|
}
|
||||||
|
"agent_skill_dependency" {
|
||||||
|
varchar_36_ agentId PK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar_36_ skillId PK
|
||||||
|
varchar skillVersionId FK
|
||||||
|
}
|
||||||
"agent_task_definition" {
|
"agent_task_definition" {
|
||||||
varchar_36_ agentId FK
|
varchar_36_ agentId FK
|
||||||
datetime_3_ createdAt
|
datetime_3_ createdAt
|
||||||
|
|
@ -322,6 +334,15 @@ erDiagram
|
||||||
INTEGER tokenCount
|
INTEGER tokenCount
|
||||||
datetime_3_ updatedAt
|
datetime_3_ updatedAt
|
||||||
}
|
}
|
||||||
|
"skill" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar_36_ id PK
|
||||||
|
varchar_36_ projectId FK
|
||||||
|
varchar_16_ source
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
"project" {
|
"project" {
|
||||||
datetime_3_ createdAt
|
datetime_3_ createdAt
|
||||||
varchar creatorId FK
|
varchar creatorId FK
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
|
||||||
15
docs/generated/sqlite-schema/project.md
generated
15
docs/generated/sqlite-schema/project.md
generated
|
|
@ -20,7 +20,7 @@ CREATE TABLE "project" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" varchar(25
|
||||||
| customTelemetryTags | TEXT | '[]' | false | | | |
|
| customTelemetryTags | TEXT | '[]' | false | | | |
|
||||||
| description | varchar(512) | | true | | | |
|
| description | varchar(512) | | true | | | |
|
||||||
| icon | TEXT | | true | | | |
|
| icon | TEXT | | true | | | |
|
||||||
| id | varchar(36) | | false | [activity_event](activity_event.md) [agent_chat_attachments](agent_chat_attachments.md) [agent_execution_threads](agent_execution_threads.md) [agents](agents.md) [ai_preference](ai_preference.md) [data_table](data_table.md) [folder](folder.md) [insights_metadata](insights_metadata.md) [instance_ai_threads](instance_ai_threads.md) [project_pool_settings](project_pool_settings.md) [project_relation](project_relation.md) [project_secrets_provider_access](project_secrets_provider_access.md) [promotion_connection_project](promotion_connection_project.md) [role_mapping_rule_project](role_mapping_rule_project.md) [self_healing_result](self_healing_result.md) [shared_credentials](shared_credentials.md) [shared_workflow](shared_workflow.md) [type_availability_policy_scope](type_availability_policy_scope.md) [variables](variables.md) [workflow_review_request](workflow_review_request.md) [workflow_suggestion](workflow_suggestion.md) | | |
|
| id | varchar(36) | | false | [activity_event](activity_event.md) [agent_chat_attachments](agent_chat_attachments.md) [agent_execution_threads](agent_execution_threads.md) [agents](agents.md) [ai_preference](ai_preference.md) [data_table](data_table.md) [folder](folder.md) [insights_metadata](insights_metadata.md) [instance_ai_threads](instance_ai_threads.md) [project_pool_settings](project_pool_settings.md) [project_relation](project_relation.md) [project_secrets_provider_access](project_secrets_provider_access.md) [promotion_connection_project](promotion_connection_project.md) [role_mapping_rule_project](role_mapping_rule_project.md) [self_healing_result](self_healing_result.md) [shared_credentials](shared_credentials.md) [shared_workflow](shared_workflow.md) [skill](skill.md) [type_availability_policy_scope](type_availability_policy_scope.md) [variables](variables.md) [workflow_review_request](workflow_review_request.md) [workflow_suggestion](workflow_suggestion.md) | | |
|
||||||
| name | varchar(255) | | false | | | |
|
| name | varchar(255) | | false | | | |
|
||||||
| type | varchar(36) | | false | | | |
|
| type | varchar(36) | | false | | | |
|
||||||
| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
||||||
|
|
@ -48,7 +48,7 @@ erDiagram
|
||||||
"activity_event" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"activity_event" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agent_chat_attachments" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agent_chat_attachments" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agent_execution_threads" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agent_execution_threads" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"agents" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"agents" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"ai_preference" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"ai_preference" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"data_table" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"data_table" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"folder" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"folder" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
|
@ -62,6 +62,7 @@ erDiagram
|
||||||
"self_healing_result" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"self_healing_result" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"shared_credentials" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"shared_credentials" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"shared_workflow" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"shared_workflow" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"skill" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"type_availability_policy_scope" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"type_availability_policy_scope" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"variables" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"variables" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"workflow_review_request" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"workflow_review_request" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
|
@ -153,6 +154,7 @@ erDiagram
|
||||||
varchar_255_ projectId FK
|
varchar_255_ projectId FK
|
||||||
INTEGER revision
|
INTEGER revision
|
||||||
TEXT schema
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
datetime_3_ setupCompletedAt
|
datetime_3_ setupCompletedAt
|
||||||
TEXT skills
|
TEXT skills
|
||||||
TEXT tools
|
TEXT tools
|
||||||
|
|
@ -261,6 +263,15 @@ erDiagram
|
||||||
datetime_3_ updatedAt
|
datetime_3_ updatedAt
|
||||||
varchar_36_ workflowId PK
|
varchar_36_ workflowId PK
|
||||||
}
|
}
|
||||||
|
"skill" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar_36_ id PK
|
||||||
|
varchar_36_ projectId FK
|
||||||
|
varchar_16_ source
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
"type_availability_policy_scope" {
|
"type_availability_policy_scope" {
|
||||||
datetime_3_ createdAt
|
datetime_3_ createdAt
|
||||||
varchar_16_ defaultAction
|
varchar_16_ defaultAction
|
||||||
|
|
|
||||||
13
docs/generated/sqlite-schema/promotion_config.md
generated
13
docs/generated/sqlite-schema/promotion_config.md
generated
|
|
@ -18,7 +18,7 @@ CREATE TABLE "promotion_config" ("id" varchar(36) PRIMARY KEY NOT NULL, "connect
|
||||||
| connectionId | varchar(36) | | false | | [promotion_connection](promotion_connection.md) | |
|
| connectionId | varchar(36) | | false | | [promotion_connection](promotion_connection.md) | |
|
||||||
| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
||||||
| direction | varchar(16) | | false | | | |
|
| direction | varchar(16) | | false | | | |
|
||||||
| id | varchar(36) | | false | | | |
|
| id | varchar(36) | | false | [promotion_run](promotion_run.md) | | |
|
||||||
| name | varchar(128) | | false | | | |
|
| name | varchar(128) | | false | | | |
|
||||||
| settings | TEXT | | false | | | |
|
| settings | TEXT | | false | | | |
|
||||||
| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
||||||
|
|
@ -45,6 +45,7 @@ CREATE TABLE "promotion_config" ("id" varchar(36) PRIMARY KEY NOT NULL, "connect
|
||||||
erDiagram
|
erDiagram
|
||||||
|
|
||||||
"promotion_config" }o--|| "promotion_connection" : "FOREIGN KEY (connectionId) REFERENCES promotion_connection (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"promotion_config" }o--|| "promotion_connection" : "FOREIGN KEY (connectionId) REFERENCES promotion_connection (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"promotion_run" }o--o| "promotion_config" : "FOREIGN KEY (configId) REFERENCES promotion_config (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
|
||||||
"promotion_config" {
|
"promotion_config" {
|
||||||
varchar_36_ connectionId FK
|
varchar_36_ connectionId FK
|
||||||
|
|
@ -64,6 +65,16 @@ erDiagram
|
||||||
TEXT target
|
TEXT target
|
||||||
datetime_3_ updatedAt
|
datetime_3_ updatedAt
|
||||||
}
|
}
|
||||||
|
"promotion_run" {
|
||||||
|
varchar_36_ configId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
TEXT details
|
||||||
|
varchar_16_ direction
|
||||||
|
varchar id PK
|
||||||
|
varchar reviewId FK
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
15
docs/generated/sqlite-schema/promotion_connection.md
generated
15
docs/generated/sqlite-schema/promotion_connection.md
generated
|
|
@ -16,7 +16,7 @@ CREATE TABLE "promotion_connection" ("id" varchar(36) PRIMARY KEY NOT NULL, "nam
|
||||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||||
| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
||||||
| id | varchar(36) | | false | [promotion_config](promotion_config.md) [promotion_connection_project](promotion_connection_project.md) | | |
|
| id | varchar(36) | | false | [promotion_config](promotion_config.md) [promotion_connection_project](promotion_connection_project.md) [promotion_review](promotion_review.md) | | |
|
||||||
| name | varchar(128) | | false | | | |
|
| name | varchar(128) | | false | | | |
|
||||||
| providerId | varchar(36) | | false | | [promotion_provider](promotion_provider.md) | |
|
| providerId | varchar(36) | | false | | [promotion_provider](promotion_provider.md) | |
|
||||||
| scope | varchar(16) | | false | | | |
|
| scope | varchar(16) | | false | | | |
|
||||||
|
|
@ -47,6 +47,7 @@ erDiagram
|
||||||
|
|
||||||
"promotion_config" }o--|| "promotion_connection" : "FOREIGN KEY (connectionId) REFERENCES promotion_connection (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"promotion_config" }o--|| "promotion_connection" : "FOREIGN KEY (connectionId) REFERENCES promotion_connection (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"promotion_connection_project" }o--|| "promotion_connection" : "FOREIGN KEY (connectionId) REFERENCES promotion_connection (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"promotion_connection_project" }o--|| "promotion_connection" : "FOREIGN KEY (connectionId) REFERENCES promotion_connection (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"promotion_review" }o--o| "promotion_connection" : "FOREIGN KEY (connectionId) REFERENCES promotion_connection (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
"promotion_connection" }o--|| "promotion_provider" : "FOREIGN KEY (providerId) REFERENCES promotion_provider (id) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE"
|
"promotion_connection" }o--|| "promotion_provider" : "FOREIGN KEY (providerId) REFERENCES promotion_provider (id) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE"
|
||||||
|
|
||||||
"promotion_connection" {
|
"promotion_connection" {
|
||||||
|
|
@ -73,6 +74,18 @@ erDiagram
|
||||||
varchar_36_ projectId PK
|
varchar_36_ projectId PK
|
||||||
datetime_3_ updatedAt
|
datetime_3_ updatedAt
|
||||||
}
|
}
|
||||||
|
"promotion_review" {
|
||||||
|
datetime_3_ approvedAt
|
||||||
|
varchar approvedById FK
|
||||||
|
varchar_36_ connectionId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar id PK
|
||||||
|
datetime_3_ lastStateChangeAt
|
||||||
|
varchar_255_ remoteReviewId
|
||||||
|
varchar_32_ state
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
"promotion_provider" {
|
"promotion_provider" {
|
||||||
TEXT auth
|
TEXT auth
|
||||||
varchar_32_ authType
|
varchar_32_ authType
|
||||||
|
|
|
||||||
112
docs/generated/sqlite-schema/promotion_review.md
generated
Normal file
112
docs/generated/sqlite-schema/promotion_review.md
generated
Normal file
|
|
@ -0,0 +1,112 @@
|
||||||
|
# promotion_review
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Table Definition</strong></summary>
|
||||||
|
|
||||||
|
```sql
|
||||||
|
CREATE TABLE "promotion_review" ("id" varchar PRIMARY KEY NOT NULL, "connectionId" varchar(36), "type" varchar(16) NOT NULL, "remoteReviewId" varchar(255), "state" varchar(32) NOT NULL DEFAULT ('open'), "lastStateChangeAt" datetime(3), "createdById" varchar, "approvedById" varchar, "approvedAt" datetime(3), "createdAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT "CHK_promotion_review_type" CHECK ("type" IN ('gitlab')), CONSTRAINT "CHK_promotion_review_state" CHECK ("state" IN ('open', 'changes_requested', 'merged', 'closed')), CONSTRAINT "FK_promotion_review_connectionId" FOREIGN KEY ("connectionId") REFERENCES "promotion_connection" ("id") ON DELETE SET NULL, CONSTRAINT "FK_promotion_review_createdById" FOREIGN KEY ("createdById") REFERENCES "user" ("id") ON DELETE SET NULL, CONSTRAINT "FK_promotion_review_approvedById" FOREIGN KEY ("approvedById") REFERENCES "user" ("id") ON DELETE SET NULL)
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Columns
|
||||||
|
|
||||||
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||||
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||||
|
| approvedAt | datetime(3) | | true | | | |
|
||||||
|
| approvedById | varchar | | true | | [user](user.md) | |
|
||||||
|
| connectionId | varchar(36) | | true | | [promotion_connection](promotion_connection.md) | |
|
||||||
|
| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
||||||
|
| createdById | varchar | | true | | [user](user.md) | |
|
||||||
|
| id | varchar | | false | [promotion_run](promotion_run.md) | | |
|
||||||
|
| lastStateChangeAt | datetime(3) | | true | | | |
|
||||||
|
| remoteReviewId | varchar(255) | | true | | | |
|
||||||
|
| state | varchar(32) | 'open' | false | | | |
|
||||||
|
| type | varchar(16) | | false | | | |
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
| Name | Type | Definition |
|
||||||
|
| ---- | ---- | ---------- |
|
||||||
|
| - | CHECK | CHECK ("type" IN ('gitlab')) |
|
||||||
|
| - | CHECK | CHECK ("state" IN ('open', 'changes_requested', 'merged', 'closed')) |
|
||||||
|
| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (approvedById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE |
|
||||||
|
| - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE |
|
||||||
|
| - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (connectionId) REFERENCES promotion_connection (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE |
|
||||||
|
| id | PRIMARY KEY | PRIMARY KEY (id) |
|
||||||
|
| sqlite_autoindex_promotion_review_1 | PRIMARY KEY | PRIMARY KEY (id) |
|
||||||
|
|
||||||
|
## Indexes
|
||||||
|
|
||||||
|
| Name | Definition |
|
||||||
|
| ---- | ---------- |
|
||||||
|
| IDX_82d6930410e9e6c7d04c515079 | CREATE INDEX "IDX_82d6930410e9e6c7d04c515079" ON "promotion_review" ("state", "createdAt") |
|
||||||
|
| IDX_93e4ec34f4091a0333af0076b6 | CREATE INDEX "IDX_93e4ec34f4091a0333af0076b6" ON "promotion_review" ("connectionId") |
|
||||||
|
| IDX_promotion_review_connectionId_remoteReviewId | CREATE UNIQUE INDEX "IDX_promotion_review_connectionId_remoteReviewId" ON "promotion_review" ("connectionId", "remoteReviewId") WHERE "remoteReviewId" IS NOT NULL |
|
||||||
|
| sqlite_autoindex_promotion_review_1 | PRIMARY KEY (id) |
|
||||||
|
|
||||||
|
## Relations
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
erDiagram
|
||||||
|
|
||||||
|
"promotion_review" }o--o| "user" : "FOREIGN KEY (approvedById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
"promotion_review" }o--o| "promotion_connection" : "FOREIGN KEY (connectionId) REFERENCES promotion_connection (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
"promotion_review" }o--o| "user" : "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
"promotion_run" }o--o| "promotion_review" : "FOREIGN KEY (reviewId) REFERENCES promotion_review (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
|
||||||
|
"promotion_review" {
|
||||||
|
datetime_3_ approvedAt
|
||||||
|
varchar approvedById FK
|
||||||
|
varchar_36_ connectionId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar id PK
|
||||||
|
datetime_3_ lastStateChangeAt
|
||||||
|
varchar_255_ remoteReviewId
|
||||||
|
varchar_32_ state
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
|
"user" {
|
||||||
|
datetime_3_ createdAt
|
||||||
|
boolean disabled
|
||||||
|
varchar_255_ email
|
||||||
|
varchar_32_ firstName
|
||||||
|
varchar id PK
|
||||||
|
date lastActiveAt
|
||||||
|
varchar_32_ lastName
|
||||||
|
boolean mfaEnabled
|
||||||
|
TEXT mfaRecoveryCodes
|
||||||
|
TEXT mfaSecret
|
||||||
|
varchar password
|
||||||
|
TEXT personalizationAnswers
|
||||||
|
varchar_128_ roleSlug FK
|
||||||
|
TEXT settings
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
|
"promotion_connection" {
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar_36_ id PK
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_36_ providerId FK
|
||||||
|
varchar_16_ scope
|
||||||
|
TEXT target
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
|
"promotion_run" {
|
||||||
|
varchar_36_ configId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
TEXT details
|
||||||
|
varchar_16_ direction
|
||||||
|
varchar id PK
|
||||||
|
varchar reviewId FK
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||||
108
docs/generated/sqlite-schema/promotion_run.md
generated
Normal file
108
docs/generated/sqlite-schema/promotion_run.md
generated
Normal file
|
|
@ -0,0 +1,108 @@
|
||||||
|
# promotion_run
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Table Definition</strong></summary>
|
||||||
|
|
||||||
|
```sql
|
||||||
|
CREATE TABLE "promotion_run" ("id" varchar PRIMARY KEY NOT NULL, "configId" varchar(36), "direction" varchar(16) NOT NULL, "type" varchar(16) NOT NULL, "createdById" varchar, "details" text, "reviewId" varchar, "createdAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT "CHK_promotion_run_direction" CHECK ("direction" IN ('promote', 'apply')), CONSTRAINT "CHK_promotion_run_type" CHECK ("type" IN ('git')), CONSTRAINT "FK_promotion_run_configId" FOREIGN KEY ("configId") REFERENCES "promotion_config" ("id") ON DELETE SET NULL, CONSTRAINT "FK_promotion_run_createdById" FOREIGN KEY ("createdById") REFERENCES "user" ("id") ON DELETE SET NULL, CONSTRAINT "FK_promotion_run_reviewId" FOREIGN KEY ("reviewId") REFERENCES "promotion_review" ("id") ON DELETE SET NULL)
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Columns
|
||||||
|
|
||||||
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||||
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||||
|
| configId | varchar(36) | | true | | [promotion_config](promotion_config.md) | |
|
||||||
|
| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
||||||
|
| createdById | varchar | | true | | [user](user.md) | |
|
||||||
|
| details | TEXT | | true | | | |
|
||||||
|
| direction | varchar(16) | | false | | | |
|
||||||
|
| id | varchar | | false | | | |
|
||||||
|
| reviewId | varchar | | true | | [promotion_review](promotion_review.md) | |
|
||||||
|
| type | varchar(16) | | false | | | |
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
| Name | Type | Definition |
|
||||||
|
| ---- | ---- | ---------- |
|
||||||
|
| - | CHECK | CHECK ("direction" IN ('promote', 'apply')) |
|
||||||
|
| - | CHECK | CHECK ("type" IN ('git')) |
|
||||||
|
| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (reviewId) REFERENCES promotion_review (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE |
|
||||||
|
| - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE |
|
||||||
|
| - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (configId) REFERENCES promotion_config (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE |
|
||||||
|
| id | PRIMARY KEY | PRIMARY KEY (id) |
|
||||||
|
| sqlite_autoindex_promotion_run_1 | PRIMARY KEY | PRIMARY KEY (id) |
|
||||||
|
|
||||||
|
## Indexes
|
||||||
|
|
||||||
|
| Name | Definition |
|
||||||
|
| ---- | ---------- |
|
||||||
|
| IDX_5c00951cc85ac1bc6f120b1e69 | CREATE INDEX "IDX_5c00951cc85ac1bc6f120b1e69" ON "promotion_run" ("configId") |
|
||||||
|
| IDX_b24c3e6b803dc496c8702f12ab | CREATE INDEX "IDX_b24c3e6b803dc496c8702f12ab" ON "promotion_run" ("reviewId") |
|
||||||
|
| sqlite_autoindex_promotion_run_1 | PRIMARY KEY (id) |
|
||||||
|
|
||||||
|
## Relations
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
erDiagram
|
||||||
|
|
||||||
|
"promotion_run" }o--o| "promotion_config" : "FOREIGN KEY (configId) REFERENCES promotion_config (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
"promotion_run" }o--o| "user" : "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
"promotion_run" }o--o| "promotion_review" : "FOREIGN KEY (reviewId) REFERENCES promotion_review (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
|
||||||
|
"promotion_run" {
|
||||||
|
varchar_36_ configId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
TEXT details
|
||||||
|
varchar_16_ direction
|
||||||
|
varchar id PK
|
||||||
|
varchar reviewId FK
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
|
"promotion_config" {
|
||||||
|
varchar_36_ connectionId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar_16_ direction
|
||||||
|
varchar_36_ id PK
|
||||||
|
varchar_128_ name
|
||||||
|
TEXT settings
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
|
"user" {
|
||||||
|
datetime_3_ createdAt
|
||||||
|
boolean disabled
|
||||||
|
varchar_255_ email
|
||||||
|
varchar_32_ firstName
|
||||||
|
varchar id PK
|
||||||
|
date lastActiveAt
|
||||||
|
varchar_32_ lastName
|
||||||
|
boolean mfaEnabled
|
||||||
|
TEXT mfaRecoveryCodes
|
||||||
|
TEXT mfaSecret
|
||||||
|
varchar password
|
||||||
|
TEXT personalizationAnswers
|
||||||
|
varchar_128_ roleSlug FK
|
||||||
|
TEXT settings
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
|
"promotion_review" {
|
||||||
|
datetime_3_ approvedAt
|
||||||
|
varchar approvedById FK
|
||||||
|
varchar_36_ connectionId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar id PK
|
||||||
|
datetime_3_ lastStateChangeAt
|
||||||
|
varchar_255_ remoteReviewId
|
||||||
|
varchar_32_ state
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||||
140
docs/generated/sqlite-schema/skill.md
generated
Normal file
140
docs/generated/sqlite-schema/skill.md
generated
Normal file
|
|
@ -0,0 +1,140 @@
|
||||||
|
# skill
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Table Definition</strong></summary>
|
||||||
|
|
||||||
|
```sql
|
||||||
|
CREATE TABLE "skill" ("id" varchar(36) PRIMARY KEY NOT NULL, "projectId" varchar(36), "agentId" varchar(36), "source" varchar(16) NOT NULL, "createdById" varchar, "createdAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), "updatedAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT "CHK_skill_single_target" CHECK ("agentId" IS NULL OR "projectId" IS NULL), CONSTRAINT "FK_402ed37bff0d3134f6e782455ed" FOREIGN KEY ("projectId") REFERENCES "project" ("id") ON DELETE CASCADE, CONSTRAINT "FK_7d4fb6af107e507d9a86293cf9d" FOREIGN KEY ("agentId") REFERENCES "agents" ("id") ON DELETE CASCADE, CONSTRAINT "FK_4de4501583cd1fcd6f5ea85f547" FOREIGN KEY ("createdById") REFERENCES "user" ("id") ON DELETE SET NULL)
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Columns
|
||||||
|
|
||||||
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||||
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||||
|
| agentId | varchar(36) | | true | | [agents](agents.md) | |
|
||||||
|
| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
||||||
|
| createdById | varchar | | true | | [user](user.md) | |
|
||||||
|
| id | varchar(36) | | false | [agent_skill_dependency](agent_skill_dependency.md) [agent_version_skill_dependency](agent_version_skill_dependency.md) [skill_version](skill_version.md) | | |
|
||||||
|
| projectId | varchar(36) | | true | | [project](project.md) | |
|
||||||
|
| source | varchar(16) | | false | | | |
|
||||||
|
| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
| Name | Type | Definition |
|
||||||
|
| ---- | ---- | ---------- |
|
||||||
|
| - | CHECK | CHECK ("agentId" IS NULL OR "projectId" IS NULL) |
|
||||||
|
| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE |
|
||||||
|
| - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
|
||||||
|
| - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
|
||||||
|
| id | PRIMARY KEY | PRIMARY KEY (id) |
|
||||||
|
| sqlite_autoindex_skill_1 | PRIMARY KEY | PRIMARY KEY (id) |
|
||||||
|
|
||||||
|
## Indexes
|
||||||
|
|
||||||
|
| Name | Definition |
|
||||||
|
| ---- | ---------- |
|
||||||
|
| IDX_402ed37bff0d3134f6e782455e | CREATE INDEX "IDX_402ed37bff0d3134f6e782455e" ON "skill" ("projectId") |
|
||||||
|
| IDX_7d4fb6af107e507d9a86293cf9 | CREATE INDEX "IDX_7d4fb6af107e507d9a86293cf9" ON "skill" ("agentId") |
|
||||||
|
| sqlite_autoindex_skill_1 | PRIMARY KEY (id) |
|
||||||
|
|
||||||
|
## Relations
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
erDiagram
|
||||||
|
|
||||||
|
"skill" }o--o| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"skill" }o--o| "user" : "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
"agent_skill_dependency" |o--|| "skill" : "FOREIGN KEY (skillId) REFERENCES skill (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"agent_version_skill_dependency" |o--|| "skill" : "FOREIGN KEY (skillId) REFERENCES skill (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"skill_version" }o--|| "skill" : "FOREIGN KEY (skillId) REFERENCES skill (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"skill" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
|
||||||
|
"skill" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar_36_ id PK
|
||||||
|
varchar_36_ projectId FK
|
||||||
|
varchar_16_ source
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
|
"agents" {
|
||||||
|
varchar_36_ activeVersionId FK
|
||||||
|
boolean availableInMCP
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar_36_ id PK
|
||||||
|
TEXT integrations
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_255_ projectId FK
|
||||||
|
INTEGER revision
|
||||||
|
TEXT schema
|
||||||
|
varchar_16_ scope
|
||||||
|
datetime_3_ setupCompletedAt
|
||||||
|
TEXT skills
|
||||||
|
TEXT tools
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
varchar_36_ versionId
|
||||||
|
}
|
||||||
|
"user" {
|
||||||
|
datetime_3_ createdAt
|
||||||
|
boolean disabled
|
||||||
|
varchar_255_ email
|
||||||
|
varchar_32_ firstName
|
||||||
|
varchar id PK
|
||||||
|
date lastActiveAt
|
||||||
|
varchar_32_ lastName
|
||||||
|
boolean mfaEnabled
|
||||||
|
TEXT mfaRecoveryCodes
|
||||||
|
TEXT mfaSecret
|
||||||
|
varchar password
|
||||||
|
TEXT personalizationAnswers
|
||||||
|
varchar_128_ roleSlug FK
|
||||||
|
TEXT settings
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
|
"agent_skill_dependency" {
|
||||||
|
varchar_36_ agentId PK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar_36_ skillId PK
|
||||||
|
varchar skillVersionId FK
|
||||||
|
}
|
||||||
|
"agent_version_skill_dependency" {
|
||||||
|
varchar_36_ agentVersionId PK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar_36_ skillId PK
|
||||||
|
varchar skillVersionId FK
|
||||||
|
}
|
||||||
|
"skill_version" {
|
||||||
|
varchar_64_ contentHash
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar_1024_ description
|
||||||
|
TEXT frontmatter
|
||||||
|
varchar id PK
|
||||||
|
TEXT instructions
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
INTEGER version
|
||||||
|
}
|
||||||
|
"project" {
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar creatorId FK
|
||||||
|
TEXT customTelemetryTags
|
||||||
|
varchar_512_ description
|
||||||
|
TEXT icon
|
||||||
|
varchar_36_ id PK
|
||||||
|
varchar_255_ name
|
||||||
|
varchar_36_ type
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||||
70
docs/generated/sqlite-schema/skill_file.md
generated
Normal file
70
docs/generated/sqlite-schema/skill_file.md
generated
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
# skill_file
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Table Definition</strong></summary>
|
||||||
|
|
||||||
|
```sql
|
||||||
|
CREATE TABLE "skill_file" ("skillVersionId" varchar NOT NULL, "path" varchar(512) NOT NULL, "content" text NOT NULL, "createdAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), "updatedAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT "FK_e9ab50b795ec8858702b7333d13" FOREIGN KEY ("skillVersionId") REFERENCES "skill_version" ("id") ON DELETE CASCADE, PRIMARY KEY ("skillVersionId", "path"))
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Columns
|
||||||
|
|
||||||
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||||
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||||
|
| content | TEXT | | false | | | |
|
||||||
|
| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
||||||
|
| path | varchar(512) | | false | | | |
|
||||||
|
| skillVersionId | varchar | | false | | [skill_version](skill_version.md) | |
|
||||||
|
| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
| Name | Type | Definition |
|
||||||
|
| ---- | ---- | ---------- |
|
||||||
|
| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (skillVersionId) REFERENCES skill_version (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
|
||||||
|
| path | PRIMARY KEY | PRIMARY KEY (path) |
|
||||||
|
| skillVersionId | PRIMARY KEY | PRIMARY KEY (skillVersionId) |
|
||||||
|
| sqlite_autoindex_skill_file_1 | PRIMARY KEY | PRIMARY KEY (skillVersionId, path) |
|
||||||
|
|
||||||
|
## Indexes
|
||||||
|
|
||||||
|
| Name | Definition |
|
||||||
|
| ---- | ---------- |
|
||||||
|
| sqlite_autoindex_skill_file_1 | PRIMARY KEY (skillVersionId, path) |
|
||||||
|
|
||||||
|
## Relations
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
erDiagram
|
||||||
|
|
||||||
|
"skill_file" |o--|| "skill_version" : "FOREIGN KEY (skillVersionId) REFERENCES skill_version (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
|
||||||
|
"skill_file" {
|
||||||
|
TEXT content
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar_512_ path PK
|
||||||
|
varchar skillVersionId PK
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
|
"skill_version" {
|
||||||
|
varchar_64_ contentHash
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar_1024_ description
|
||||||
|
TEXT frontmatter
|
||||||
|
varchar id PK
|
||||||
|
TEXT instructions
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
INTEGER version
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||||
121
docs/generated/sqlite-schema/skill_version.md
generated
Normal file
121
docs/generated/sqlite-schema/skill_version.md
generated
Normal file
|
|
@ -0,0 +1,121 @@
|
||||||
|
# skill_version
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Table Definition</strong></summary>
|
||||||
|
|
||||||
|
```sql
|
||||||
|
CREATE TABLE "skill_version" ("id" varchar PRIMARY KEY NOT NULL, "skillId" varchar(36) NOT NULL, "version" integer NOT NULL, "name" varchar(128) NOT NULL, "description" varchar(1024) NOT NULL, "instructions" text NOT NULL, "frontmatter" text, "contentHash" varchar(64) NOT NULL, "createdById" varchar, "createdAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), "updatedAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT "UQ_93bb78a1eb4e0890fac6b69df95" UNIQUE ("skillId", "version"), CONSTRAINT "CHK_skill_version_version" CHECK ("version" > 0), CONSTRAINT "FK_f87064c0a29efd2d5195328d91a" FOREIGN KEY ("skillId") REFERENCES "skill" ("id") ON DELETE CASCADE, CONSTRAINT "FK_9565d0fbf32cd463f9b47c7adab" FOREIGN KEY ("createdById") REFERENCES "user" ("id") ON DELETE SET NULL)
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Columns
|
||||||
|
|
||||||
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||||
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||||
|
| contentHash | varchar(64) | | false | | | |
|
||||||
|
| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
||||||
|
| createdById | varchar | | true | | [user](user.md) | |
|
||||||
|
| description | varchar(1024) | | false | | | |
|
||||||
|
| frontmatter | TEXT | | true | | | |
|
||||||
|
| id | varchar | | false | [agent_skill_dependency](agent_skill_dependency.md) [agent_version_skill_dependency](agent_version_skill_dependency.md) [skill_file](skill_file.md) | | |
|
||||||
|
| instructions | TEXT | | false | | | |
|
||||||
|
| name | varchar(128) | | false | | | |
|
||||||
|
| skillId | varchar(36) | | false | | [skill](skill.md) | |
|
||||||
|
| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | |
|
||||||
|
| version | INTEGER | | false | | | |
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
| Name | Type | Definition |
|
||||||
|
| ---- | ---- | ---------- |
|
||||||
|
| - | CHECK | CHECK ("version" > 0) |
|
||||||
|
| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE |
|
||||||
|
| - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (skillId) REFERENCES skill (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
|
||||||
|
| id | PRIMARY KEY | PRIMARY KEY (id) |
|
||||||
|
| sqlite_autoindex_skill_version_1 | PRIMARY KEY | PRIMARY KEY (id) |
|
||||||
|
| sqlite_autoindex_skill_version_2 | UNIQUE | UNIQUE (skillId, version) |
|
||||||
|
|
||||||
|
## Indexes
|
||||||
|
|
||||||
|
| Name | Definition |
|
||||||
|
| ---- | ---------- |
|
||||||
|
| sqlite_autoindex_skill_version_1 | PRIMARY KEY (id) |
|
||||||
|
| sqlite_autoindex_skill_version_2 | UNIQUE (skillId, version) |
|
||||||
|
|
||||||
|
## Relations
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
erDiagram
|
||||||
|
|
||||||
|
"skill_version" }o--o| "user" : "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
"agent_skill_dependency" }o--o| "skill_version" : "FOREIGN KEY (skillVersionId) REFERENCES skill_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE"
|
||||||
|
"agent_version_skill_dependency" }o--|| "skill_version" : "FOREIGN KEY (skillVersionId) REFERENCES skill_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE"
|
||||||
|
"skill_file" |o--|| "skill_version" : "FOREIGN KEY (skillVersionId) REFERENCES skill_version (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"skill_version" }o--|| "skill" : "FOREIGN KEY (skillId) REFERENCES skill (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
|
||||||
|
"skill_version" {
|
||||||
|
varchar_64_ contentHash
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar_1024_ description
|
||||||
|
TEXT frontmatter
|
||||||
|
varchar id PK
|
||||||
|
TEXT instructions
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
INTEGER version
|
||||||
|
}
|
||||||
|
"user" {
|
||||||
|
datetime_3_ createdAt
|
||||||
|
boolean disabled
|
||||||
|
varchar_255_ email
|
||||||
|
varchar_32_ firstName
|
||||||
|
varchar id PK
|
||||||
|
date lastActiveAt
|
||||||
|
varchar_32_ lastName
|
||||||
|
boolean mfaEnabled
|
||||||
|
TEXT mfaRecoveryCodes
|
||||||
|
TEXT mfaSecret
|
||||||
|
varchar password
|
||||||
|
TEXT personalizationAnswers
|
||||||
|
varchar_128_ roleSlug FK
|
||||||
|
TEXT settings
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
|
"agent_skill_dependency" {
|
||||||
|
varchar_36_ agentId PK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar_36_ skillId PK
|
||||||
|
varchar skillVersionId FK
|
||||||
|
}
|
||||||
|
"agent_version_skill_dependency" {
|
||||||
|
varchar_36_ agentVersionId PK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar_36_ skillId PK
|
||||||
|
varchar skillVersionId FK
|
||||||
|
}
|
||||||
|
"skill_file" {
|
||||||
|
TEXT content
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar_512_ path PK
|
||||||
|
varchar skillVersionId PK
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
|
"skill" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar_36_ id PK
|
||||||
|
varchar_36_ projectId FK
|
||||||
|
varchar_16_ source
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||||
51
docs/generated/sqlite-schema/user.md
generated
51
docs/generated/sqlite-schema/user.md
generated
|
|
@ -19,7 +19,7 @@ CREATE TABLE "user" ("id" varchar PRIMARY KEY, "email" varchar(255), "firstName"
|
||||||
| disabled | boolean | FALSE | false | | | |
|
| disabled | boolean | FALSE | false | | | |
|
||||||
| email | varchar(255) | | true | | | |
|
| email | varchar(255) | | true | | | |
|
||||||
| firstName | varchar(32) | | true | | | |
|
| firstName | varchar(32) | | true | | | |
|
||||||
| id | varchar | | true | [activity_event](activity_event.md) [agent_eval_dataset](agent_eval_dataset.md) [agent_eval_rating](agent_eval_rating.md) [agent_eval_run](agent_eval_run.md) [agent_execution_threads](agent_execution_threads.md) [agent_history](agent_history.md) [ai_preference](ai_preference.md) [auth_identity](auth_identity.md) [chat_hub_agents](chat_hub_agents.md) [chat_hub_sessions](chat_hub_sessions.md) [chat_hub_tools](chat_hub_tools.md) [dynamic_credential_user_entry](dynamic_credential_user_entry.md) [evaluation_collection](evaluation_collection.md) [idempotency_key](idempotency_key.md) [instance_ai_mcp_registry_connections](instance_ai_mcp_registry_connections.md) [instance_ai_pending_confirmations](instance_ai_pending_confirmations.md) [instance_ai_thread_grants](instance_ai_thread_grants.md) [instance_ai_thread_tabs](instance_ai_thread_tabs.md) [migration_workflow_owner](migration_workflow_owner.md) [oauth_access_tokens](oauth_access_tokens.md) [oauth_authorization_codes](oauth_authorization_codes.md) [oauth_refresh_tokens](oauth_refresh_tokens.md) [oauth_user_consents](oauth_user_consents.md) [project](project.md) [project_relation](project_relation.md) [self_healing_result](self_healing_result.md) [trusted_source_identity](trusted_source_identity.md) [user_api_keys](user_api_keys.md) [user_favorites](user_favorites.md) [workflow_builder_session](workflow_builder_session.md) [workflow_publish_history](workflow_publish_history.md) [workflow_review_activity](workflow_review_activity.md) [workflow_review_activity_comment](workflow_review_activity_comment.md) [workflow_review_request](workflow_review_request.md) [workflow_review_request_authors](workflow_review_request_authors.md) [workflow_review_request_reviewers](workflow_review_request_reviewers.md) [workflow_suggestion](workflow_suggestion.md) [workflow_suggestion_activity](workflow_suggestion_activity.md) | | |
|
| id | varchar | | true | [activity_event](activity_event.md) [agent_eval_dataset](agent_eval_dataset.md) [agent_eval_rating](agent_eval_rating.md) [agent_eval_run](agent_eval_run.md) [agent_execution_threads](agent_execution_threads.md) [agent_history](agent_history.md) [ai_preference](ai_preference.md) [auth_identity](auth_identity.md) [chat_hub_agents](chat_hub_agents.md) [chat_hub_sessions](chat_hub_sessions.md) [chat_hub_tools](chat_hub_tools.md) [dynamic_credential_user_entry](dynamic_credential_user_entry.md) [evaluation_collection](evaluation_collection.md) [idempotency_key](idempotency_key.md) [instance_ai_mcp_registry_connections](instance_ai_mcp_registry_connections.md) [instance_ai_pending_confirmations](instance_ai_pending_confirmations.md) [instance_ai_thread_grants](instance_ai_thread_grants.md) [instance_ai_thread_tabs](instance_ai_thread_tabs.md) [migration_workflow_owner](migration_workflow_owner.md) [oauth_access_tokens](oauth_access_tokens.md) [oauth_authorization_codes](oauth_authorization_codes.md) [oauth_refresh_tokens](oauth_refresh_tokens.md) [oauth_user_consents](oauth_user_consents.md) [project](project.md) [project_relation](project_relation.md) [promotion_review](promotion_review.md) [promotion_run](promotion_run.md) [self_healing_result](self_healing_result.md) [skill](skill.md) [skill_version](skill_version.md) [trusted_source_identity](trusted_source_identity.md) [user_api_keys](user_api_keys.md) [user_favorites](user_favorites.md) [workflow_builder_session](workflow_builder_session.md) [workflow_publish_history](workflow_publish_history.md) [workflow_review_activity](workflow_review_activity.md) [workflow_review_activity_comment](workflow_review_activity_comment.md) [workflow_review_request](workflow_review_request.md) [workflow_review_request_authors](workflow_review_request_authors.md) [workflow_review_request_reviewers](workflow_review_request_reviewers.md) [workflow_suggestion](workflow_suggestion.md) [workflow_suggestion_activity](workflow_suggestion_activity.md) | | |
|
||||||
| lastActiveAt | date | | true | | | |
|
| lastActiveAt | date | | true | | | |
|
||||||
| lastName | varchar(32) | | true | | | |
|
| lastName | varchar(32) | | true | | | |
|
||||||
| mfaEnabled | boolean | FALSE | false | | | |
|
| mfaEnabled | boolean | FALSE | false | | | |
|
||||||
|
|
@ -80,8 +80,13 @@ erDiagram
|
||||||
"oauth_user_consents" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"oauth_user_consents" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"project" }o--o| "user" : "FOREIGN KEY (creatorId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
"project" }o--o| "user" : "FOREIGN KEY (creatorId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
"project_relation" |o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"project_relation" |o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"promotion_review" }o--o| "user" : "FOREIGN KEY (approvedById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
"promotion_review" }o--o| "user" : "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
"promotion_run" }o--o| "user" : "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
"self_healing_result" }o--o| "user" : "FOREIGN KEY (dismissedById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
"self_healing_result" }o--o| "user" : "FOREIGN KEY (dismissedById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
"self_healing_result" }o--|| "user" : "FOREIGN KEY (backgroundUserId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"self_healing_result" }o--|| "user" : "FOREIGN KEY (backgroundUserId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
"skill" }o--o| "user" : "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
|
"skill_version" }o--o| "user" : "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
||||||
"trusted_source_identity" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"trusted_source_identity" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"user_api_keys" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"user_api_keys" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
"user_favorites" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
"user_favorites" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
||||||
|
|
@ -387,6 +392,28 @@ erDiagram
|
||||||
datetime_3_ updatedAt
|
datetime_3_ updatedAt
|
||||||
varchar userId PK
|
varchar userId PK
|
||||||
}
|
}
|
||||||
|
"promotion_review" {
|
||||||
|
datetime_3_ approvedAt
|
||||||
|
varchar approvedById FK
|
||||||
|
varchar_36_ connectionId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar id PK
|
||||||
|
datetime_3_ lastStateChangeAt
|
||||||
|
varchar_255_ remoteReviewId
|
||||||
|
varchar_32_ state
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
|
"promotion_run" {
|
||||||
|
varchar_36_ configId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
TEXT details
|
||||||
|
varchar_16_ direction
|
||||||
|
varchar id PK
|
||||||
|
varchar reviewId FK
|
||||||
|
varchar_16_ type
|
||||||
|
}
|
||||||
"self_healing_result" {
|
"self_healing_result" {
|
||||||
varchar backgroundUserId FK
|
varchar backgroundUserId FK
|
||||||
datetime_3_ completedAt
|
datetime_3_ completedAt
|
||||||
|
|
@ -404,6 +431,28 @@ erDiagram
|
||||||
TEXT usage
|
TEXT usage
|
||||||
varchar_36_ workflowId FK
|
varchar_36_ workflowId FK
|
||||||
}
|
}
|
||||||
|
"skill" {
|
||||||
|
varchar_36_ agentId FK
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar_36_ id PK
|
||||||
|
varchar_36_ projectId FK
|
||||||
|
varchar_16_ source
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
}
|
||||||
|
"skill_version" {
|
||||||
|
varchar_64_ contentHash
|
||||||
|
datetime_3_ createdAt
|
||||||
|
varchar createdById FK
|
||||||
|
varchar_1024_ description
|
||||||
|
TEXT frontmatter
|
||||||
|
varchar id PK
|
||||||
|
TEXT instructions
|
||||||
|
varchar_128_ name
|
||||||
|
varchar_36_ skillId FK
|
||||||
|
datetime_3_ updatedAt
|
||||||
|
INTEGER version
|
||||||
|
}
|
||||||
"trusted_source_identity" {
|
"trusted_source_identity" {
|
||||||
datetime_3_ createdAt
|
datetime_3_ createdAt
|
||||||
datetime_3_ lastSeenAt
|
datetime_3_ lastSeenAt
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -753,6 +753,27 @@ describe('createDelegateSubAgentTool', () => {
|
||||||
expect(runSubAgent.mock.calls[0]?.[0]).not.toHaveProperty('parentAbortSignal');
|
expect(runSubAgent.mock.calls[0]?.[0]).not.toHaveProperty('parentAbortSignal');
|
||||||
expect(runSubAgent.mock.calls[0]?.[0]).not.toHaveProperty('parentExecutionCounter');
|
expect(runSubAgent.mock.calls[0]?.[0]).not.toHaveProperty('parentExecutionCounter');
|
||||||
expect(runSubAgent.mock.calls[0]?.[0]).not.toHaveProperty('parentTelemetry');
|
expect(runSubAgent.mock.calls[0]?.[0]).not.toHaveProperty('parentTelemetry');
|
||||||
|
expect(runSubAgent.mock.calls[0]?.[0]).not.toHaveProperty('parentOnGuardrailNotice');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('forwards the guardrail notice sink from the tool context to the runner callback', async () => {
|
||||||
|
const runSubAgent = vi
|
||||||
|
.fn<DelegateSubAgentRunner>()
|
||||||
|
.mockResolvedValue({ status: 'completed', taskPath: '/root/research_api', answer: 'done' });
|
||||||
|
const tool = createDelegateSubAgentTool({ runSubAgent });
|
||||||
|
const parentOnGuardrailNotice = vi.fn();
|
||||||
|
|
||||||
|
await tool.handler?.(input, {
|
||||||
|
runId: 'parent-run-1',
|
||||||
|
onGuardrailNotice: parentOnGuardrailNotice,
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(runSubAgent).toHaveBeenCalledWith(
|
||||||
|
expect.objectContaining({ parentOnGuardrailNotice }),
|
||||||
|
expect.objectContaining({
|
||||||
|
runInlineSubAgent: expect.any(Function),
|
||||||
|
}),
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('forwards the parent telemetry from the tool context to the runner callback', async () => {
|
it('forwards the parent telemetry from the tool context to the runner callback', async () => {
|
||||||
|
|
@ -1203,6 +1224,66 @@ describe('generateResultToDelegateSubAgentOutput', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('maps a guardrail stop to failed with the session cap reason', () => {
|
||||||
|
const result: GenerateResult = {
|
||||||
|
runId: 'child-run-6',
|
||||||
|
messages: [],
|
||||||
|
finishReason: 'guardrail',
|
||||||
|
guardrail: { code: 'budget.session' },
|
||||||
|
getState: () => ({
|
||||||
|
status: 'failed',
|
||||||
|
messageList: { messages: [], historyIds: [], inputIds: [], responseIds: [] },
|
||||||
|
pendingToolCalls: {},
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
|
||||||
|
expect(generateResultToDelegateSubAgentOutput('/root/x_0', result)).toMatchObject({
|
||||||
|
status: 'failed',
|
||||||
|
finishReason: 'guardrail',
|
||||||
|
error: 'The sub-agent run was stopped: the session cost cap is spent.',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('maps a monthly budget stop to failed with the monthly reason', () => {
|
||||||
|
const result: GenerateResult = {
|
||||||
|
runId: 'child-run-7',
|
||||||
|
messages: [],
|
||||||
|
finishReason: 'guardrail',
|
||||||
|
guardrail: { code: 'budget.monthly' },
|
||||||
|
getState: () => ({
|
||||||
|
status: 'failed',
|
||||||
|
messageList: { messages: [], historyIds: [], inputIds: [], responseIds: [] },
|
||||||
|
pendingToolCalls: {},
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
|
||||||
|
expect(generateResultToDelegateSubAgentOutput('/root/x_0', result)).toMatchObject({
|
||||||
|
status: 'failed',
|
||||||
|
finishReason: 'guardrail',
|
||||||
|
error: 'The sub-agent run was stopped: the monthly budget is spent.',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('keeps a recorded error over the guardrail stop reason', () => {
|
||||||
|
const result: GenerateResult = {
|
||||||
|
runId: 'child-run-8',
|
||||||
|
messages: [],
|
||||||
|
finishReason: 'guardrail',
|
||||||
|
guardrail: { code: 'budget.session' },
|
||||||
|
error: new Error('boom'),
|
||||||
|
getState: () => ({
|
||||||
|
status: 'failed',
|
||||||
|
messageList: { messages: [], historyIds: [], inputIds: [], responseIds: [] },
|
||||||
|
pendingToolCalls: {},
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
|
||||||
|
expect(generateResultToDelegateSubAgentOutput('/root/x_0', result)).toMatchObject({
|
||||||
|
status: 'failed',
|
||||||
|
error: 'boom',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it('maps a cancelled child run to cancelled, even though it also reports an error', () => {
|
it('maps a cancelled child run to cancelled, even though it also reports an error', () => {
|
||||||
const result: GenerateResult = {
|
const result: GenerateResult = {
|
||||||
runId: 'child-run-5',
|
runId: 'child-run-5',
|
||||||
|
|
|
||||||
|
|
@ -625,4 +625,37 @@ describe('McpConnection — approval declaration', () => {
|
||||||
|
|
||||||
expect(conn.declaresApproval()).toBe(true);
|
expect(conn.declaresApproval()).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('does not declare approval for non-interrupting tool configuration', () => {
|
||||||
|
const conn = new McpConnection({
|
||||||
|
name: 's1',
|
||||||
|
url: 'https://example.test/mcp',
|
||||||
|
configureTools: () => ({ toolFilter: { mode: 'exclude', tools: ['x'] } }),
|
||||||
|
configureToolsNonInterrupting: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(conn.declaresApproval()).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('ignores the non-interrupting flag when there is no tool configuration', () => {
|
||||||
|
const conn = new McpConnection({
|
||||||
|
name: 's1',
|
||||||
|
url: 'https://example.test/mcp',
|
||||||
|
configureToolsNonInterrupting: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(conn.declaresApproval()).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('still declares approval for a static requireApproval with non-interrupting tool configuration', () => {
|
||||||
|
const conn = new McpConnection({
|
||||||
|
name: 's1',
|
||||||
|
url: 'https://example.test/mcp',
|
||||||
|
configureTools: () => ({}),
|
||||||
|
configureToolsNonInterrupting: true,
|
||||||
|
requireApproval: ['delete'],
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(conn.declaresApproval()).toBe(true);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -873,6 +873,19 @@ describe('createModel', () => {
|
||||||
expect(model.useDeploymentBasedUrls).toBeUndefined();
|
expect(model.useDeploymentBasedUrls).toBeUndefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should use the deployment name on a Foundry endpoint when provided', () => {
|
||||||
|
// A Foundry deployment can be named differently from the model it
|
||||||
|
// serves, so the user's deployment name must reach the request path.
|
||||||
|
const model = createModel({
|
||||||
|
id: 'azure-openai/gpt-4.1-nano',
|
||||||
|
apiKey: 'az-key',
|
||||||
|
endpointType: 'foundry',
|
||||||
|
baseURL: 'https://my-resource.services.ai.azure.com/openai/v1',
|
||||||
|
deploymentName: 'my-chat-model',
|
||||||
|
}) as unknown as Record<string, unknown>;
|
||||||
|
expect(model.modelId).toBe('my-chat-model');
|
||||||
|
});
|
||||||
|
|
||||||
it('should treat a foundry endpoint without resourceName as valid', () => {
|
it('should treat a foundry endpoint without resourceName as valid', () => {
|
||||||
expect(() =>
|
expect(() =>
|
||||||
createModel({
|
createModel({
|
||||||
|
|
@ -993,6 +1006,19 @@ describe('createModel', () => {
|
||||||
expect(mockClientOAuth2.credentials.getToken).toHaveBeenCalledTimes(1);
|
expect(mockClientOAuth2.credentials.getToken).toHaveBeenCalledTimes(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('uses the deployment name on the Foundry Entra path when provided', () => {
|
||||||
|
// The deployment name can differ from the model it serves; it reaches
|
||||||
|
// the OpenAI-compatible path as the model id.
|
||||||
|
const model = createModel({
|
||||||
|
id: 'azure-openai/gpt-4.1-nano',
|
||||||
|
endpointType: 'foundry',
|
||||||
|
baseURL: 'https://my-resource.services.ai.azure.com/openai/v1',
|
||||||
|
deploymentName: 'my-chat-model',
|
||||||
|
...entraCreds,
|
||||||
|
}) as unknown as Record<string, unknown>;
|
||||||
|
expect(model.modelId).toBe('my-chat-model');
|
||||||
|
});
|
||||||
|
|
||||||
it('rejects credentials that supply both apiKey and Entra', () => {
|
it('rejects credentials that supply both apiKey and Entra', () => {
|
||||||
expect(() =>
|
expect(() =>
|
||||||
createModel({
|
createModel({
|
||||||
|
|
|
||||||
|
|
@ -237,6 +237,68 @@ describe('parseObservationLogMarkdown', () => {
|
||||||
]);
|
]);
|
||||||
expect(parsed.skippedLines).toEqual(['not a bullet']);
|
expect(parsed.skippedLines).toEqual(['not a bullet']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('appends indented unmarked detail lines to the entry above', () => {
|
||||||
|
const parsed = parseObservationLogMarkdown(
|
||||||
|
[
|
||||||
|
"* CRITICAL (15:09) User's invoice rules:",
|
||||||
|
' * Count only invoices with status paid or pending.',
|
||||||
|
' - Status void means cancelled.',
|
||||||
|
'* IMPORTANT (15:10) Open questions for the user',
|
||||||
|
' * INFO (15:10) Setup is blocked on two answers.',
|
||||||
|
' 1. Which bridge do they use?',
|
||||||
|
' 2. Which webhook URL?',
|
||||||
|
].join('\n'),
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(parsed.entries).toEqual([
|
||||||
|
{
|
||||||
|
marker: 'critical',
|
||||||
|
text: "User's invoice rules: Count only invoices with status paid or pending. Status void means cancelled.",
|
||||||
|
parentIndex: null,
|
||||||
|
},
|
||||||
|
{ marker: 'important', text: 'Open questions for the user', parentIndex: null },
|
||||||
|
{
|
||||||
|
marker: 'info',
|
||||||
|
text: 'Setup is blocked on two answers. 1. Which bridge do they use? 2. Which webhook URL?',
|
||||||
|
parentIndex: 1,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
expect(parsed.skippedLines).toEqual([]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('joins a detail line with a semicolon when the entry has no closing punctuation', () => {
|
||||||
|
const parsed = parseObservationLogMarkdown(
|
||||||
|
['* INFO (10:02) Published version 90f4e3d6', ' * Current draft fbda5a15'].join('\n'),
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(parsed.entries).toEqual([
|
||||||
|
{
|
||||||
|
marker: 'info',
|
||||||
|
text: 'Published version 90f4e3d6; Current draft fbda5a15',
|
||||||
|
parentIndex: null,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('keeps detail lines that start with an uppercase word', () => {
|
||||||
|
const parsed = parseObservationLogMarkdown(
|
||||||
|
[
|
||||||
|
'* INFO (10:02) Endpoints checked:',
|
||||||
|
' * GET /orders returns 200.',
|
||||||
|
' * API key rotated.',
|
||||||
|
].join('\n'),
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(parsed.entries).toEqual([
|
||||||
|
{
|
||||||
|
marker: 'info',
|
||||||
|
text: 'Endpoints checked: GET /orders returns 200. API key rotated.',
|
||||||
|
parentIndex: null,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
expect(parsed.skippedLines).toEqual([]);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('renderObserverTranscript', () => {
|
describe('renderObserverTranscript', () => {
|
||||||
|
|
@ -520,6 +582,43 @@ describe('runObservationLogObserver', () => {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
it('writes observations with indented detail lists and advances the cursor', async () => {
|
||||||
|
const store = new InMemoryMemory();
|
||||||
|
await store.saveThread({ id: 'thread-1', resourceId: 'user-1' });
|
||||||
|
await store.saveMessages({
|
||||||
|
threadId: 'thread-1',
|
||||||
|
resourceId: 'user-1',
|
||||||
|
messages: [message('m1', 'user', 'Remember my rules.', new Date(2026, 4, 12, 14, 30))],
|
||||||
|
});
|
||||||
|
|
||||||
|
const result = await runObservationLogObserver({
|
||||||
|
memory: store,
|
||||||
|
observationScopeId: 'thread-1',
|
||||||
|
observationLogTailLimit: 20,
|
||||||
|
tokenCounter: () => 10,
|
||||||
|
now: new Date(2026, 4, 12, 14, 31),
|
||||||
|
observe: async () =>
|
||||||
|
await Promise.resolve(
|
||||||
|
[
|
||||||
|
'* CRITICAL (14:31) User rules:',
|
||||||
|
' * Count paid invoices.',
|
||||||
|
' * Skip void ones.',
|
||||||
|
].join('\n'),
|
||||||
|
),
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(result).toMatchObject({
|
||||||
|
status: 'ran',
|
||||||
|
observationsWritten: 1,
|
||||||
|
cursorAdvanced: true,
|
||||||
|
skippedLines: [],
|
||||||
|
});
|
||||||
|
expect(await store.getActiveObservationLog({ observationScopeId: 'thread-1' })).toMatchObject([
|
||||||
|
{ marker: 'critical', text: 'User rules: Count paid invoices. Skip void ones.' },
|
||||||
|
]);
|
||||||
|
expect(await store.getCursor('thread-1')).toMatchObject({ lastObservedMessageId: 'm1' });
|
||||||
|
});
|
||||||
|
|
||||||
it('writes parsed observations and advances the cursor after observing', async () => {
|
it('writes parsed observations and advances the cursor after observing', async () => {
|
||||||
const store = new InMemoryMemory();
|
const store = new InMemoryMemory();
|
||||||
const parentText = 'User needs the current request remembered.';
|
const parentText = 'User needs the current request remembered.';
|
||||||
|
|
@ -610,6 +709,12 @@ describe('runObservationLogObserver', () => {
|
||||||
'```\nNO_OBSERVATIONS\n```',
|
'```\nNO_OBSERVATIONS\n```',
|
||||||
'NO_OBSERVATIONS\n* CRITICAL Keep this fact.',
|
'NO_OBSERVATIONS\n* CRITICAL Keep this fact.',
|
||||||
'* CRITICAL Keep this fact.\nUnformatted detail.',
|
'* CRITICAL Keep this fact.\nUnformatted detail.',
|
||||||
|
' Indented detail before any entry.\n* CRITICAL Keep this fact.',
|
||||||
|
'* CRITICAL Keep this fact.\n * COMPLETED (14:31) Unknown marker.',
|
||||||
|
'* CRITICAL Keep this fact.\n * COMPLETED Deploy is set for noon.',
|
||||||
|
'* CRITICAL Keep this fact.\n * INFO: Marker with a colon.',
|
||||||
|
'* CRITICAL Keep this fact.\n ```\n code\n ```',
|
||||||
|
'* CRITICAL Keep this fact.\n NO_OBSERVATIONS',
|
||||||
'* INFO ',
|
'* INFO ',
|
||||||
'```\n* CRITICAL Keep this fact.\n```',
|
'```\n* CRITICAL Keep this fact.\n```',
|
||||||
])('rejects an invalid response without changing memory: %j', async (output) => {
|
])('rejects an invalid response without changing memory: %j', async (output) => {
|
||||||
|
|
|
||||||
|
|
@ -302,9 +302,9 @@ export class McpConnection {
|
||||||
* without requiring a network connection.
|
* without requiring a network connection.
|
||||||
*/
|
*/
|
||||||
declaresApproval(): boolean {
|
declaresApproval(): boolean {
|
||||||
const { configureTools, requireApproval } = this.config;
|
const { configureTools, configureToolsNonInterrupting, requireApproval } = this.config;
|
||||||
return (
|
return (
|
||||||
configureTools !== undefined ||
|
(configureTools !== undefined && !configureToolsNonInterrupting) ||
|
||||||
requireApproval === true ||
|
requireApproval === true ||
|
||||||
(Array.isArray(requireApproval) && requireApproval.length > 0)
|
(Array.isArray(requireApproval) && requireApproval.length > 0)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@ A valid response has exactly one of these forms:
|
||||||
|
|
||||||
Use only one indentation level. A child attaches to the preceding top-level bullet in this response. Never omit the \`*\` prefix.
|
Use only one indentation level. A child attaches to the preceding top-level bullet in this response. Never omit the \`*\` prefix.
|
||||||
|
|
||||||
|
Every line is one observation with its own marker. To add details to an observation, write each detail as a marked child, or put the details on the same line separated by semicolons. Never write a plain sub-list, a numbered list, or any line without a marker.
|
||||||
|
|
||||||
2. Exactly this marker when there is nothing durable to record:
|
2. Exactly this marker when there is nothing durable to record:
|
||||||
|
|
||||||
NO_OBSERVATIONS
|
NO_OBSERVATIONS
|
||||||
|
|
@ -90,6 +92,16 @@ GOOD:
|
||||||
* CRITICAL (14:30) User approved the data migration. Deployment requires separate approval.
|
* CRITICAL (14:30) User approved the data migration. Deployment requires separate approval.
|
||||||
* IMPORTANT (14:31) Agent plans to start the migration; completion is not verified.
|
* IMPORTANT (14:31) Agent plans to start the migration; completion is not verified.
|
||||||
|
|
||||||
|
Details go on marked lines
|
||||||
|
|
||||||
|
BAD:
|
||||||
|
* CRITICAL (15:09) User's invoice rules:
|
||||||
|
* Count only invoices with status paid or pending.
|
||||||
|
- Status void means cancelled.
|
||||||
|
|
||||||
|
GOOD:
|
||||||
|
* CRITICAL (15:09) User's invoice rules: count only invoices with status paid or pending; status void means cancelled.
|
||||||
|
|
||||||
Keep verification evidence together
|
Keep verification evidence together
|
||||||
|
|
||||||
Transcript:
|
Transcript:
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,12 @@ const MARKER_BY_TOKEN: Record<string, ObservationLogMarker> = {
|
||||||
|
|
||||||
const BULLET_PATTERN =
|
const BULLET_PATTERN =
|
||||||
/^(\s*)[*-]\s+(CRITICAL|IMPORTANT|INFO|COMPLETION)(?:\s+\(\d{2}:\d{2}\))?\s+(.+)$/iu;
|
/^(\s*)[*-]\s+(CRITICAL|IMPORTANT|INFO|COMPLETION)(?:\s+\(\d{2}:\d{2}\))?\s+(.+)$/iu;
|
||||||
|
/**
|
||||||
|
* Indented lines that are malformed structure, not detail: a fence, the sentinel, a timed
|
||||||
|
* unknown marker, or a misspelled marker. Other uppercase words (API, GET) stay detail.
|
||||||
|
*/
|
||||||
|
const NON_DETAIL_PATTERN =
|
||||||
|
/^(?:```|NO_OBSERVATIONS$|(?:[*-]\s+)?(?:[A-Z_]+\s+\(\d{2}:\d{2}\)|(?:COMPLET|CRITIC|IMPORTAN|INFO)[A-Z]*\b))/u;
|
||||||
const DEFAULT_MAX_SERIALIZED_CHARS = 2_000;
|
const DEFAULT_MAX_SERIALIZED_CHARS = 2_000;
|
||||||
const DEFAULT_MAX_STRING_CHARS = 500;
|
const DEFAULT_MAX_STRING_CHARS = 500;
|
||||||
const DEFAULT_MAX_ARRAY_ITEMS = 20;
|
const DEFAULT_MAX_ARRAY_ITEMS = 20;
|
||||||
|
|
@ -119,6 +125,13 @@ export function parseObservationLogMarkdown(markdown: string): ParseObservationL
|
||||||
|
|
||||||
const match = BULLET_PATTERN.exec(rawLine);
|
const match = BULLET_PATTERN.exec(rawLine);
|
||||||
if (!match) {
|
if (!match) {
|
||||||
|
// Models often add an indented detail list under an observation. Keep
|
||||||
|
// that detail on the entry above instead of rejecting the response.
|
||||||
|
const previous = entries.at(-1);
|
||||||
|
if (previous && /^\s/.test(rawLine) && !NON_DETAIL_PATTERN.test(trimmed)) {
|
||||||
|
previous.text = appendObservationDetail(previous.text, trimmed);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
skippedLines.push(rawLine);
|
skippedLines.push(rawLine);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -141,6 +154,12 @@ export function parseObservationLogMarkdown(markdown: string): ParseObservationL
|
||||||
return { entries, skippedLines };
|
return { entries, skippedLines };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Joins a detail line onto one line, so the rendered log keeps one entry per line. */
|
||||||
|
function appendObservationDetail(text: string, detailLine: string): string {
|
||||||
|
const detail = detailLine.replace(/^[*-]\s+/, '');
|
||||||
|
return /[:;.!?]$/.test(text) ? `${text} ${detail}` : `${text}; ${detail}`;
|
||||||
|
}
|
||||||
|
|
||||||
export function renderObserverTranscript(
|
export function renderObserverTranscript(
|
||||||
messages: AgentDbMessage[],
|
messages: AgentDbMessage[],
|
||||||
options: RenderObserverTranscriptOptions = {},
|
options: RenderObserverTranscriptOptions = {},
|
||||||
|
|
|
||||||
|
|
@ -412,6 +412,9 @@ const LANGUAGE_PROVIDERS: ProviderRegistry = {
|
||||||
// `…/openai/v1/openai`. Drive it as a plain OpenAI-compatible endpoint
|
// `…/openai/v1/openai`. Drive it as a plain OpenAI-compatible endpoint
|
||||||
// so the configured base is used verbatim.
|
// so the configured base is used verbatim.
|
||||||
if (endpointType === 'foundry') {
|
if (endpointType === 'foundry') {
|
||||||
|
// The path segment Foundry matches against is the user-chosen
|
||||||
|
// deployment name, which can differ from the model it serves.
|
||||||
|
const deploymentId = deploymentName ?? model;
|
||||||
if (isEntra) {
|
if (isEntra) {
|
||||||
// `buildOpenAiCompatible` has no `tokenProvider` slot, so wrap the
|
// `buildOpenAiCompatible` has no `tokenProvider` slot, so wrap the
|
||||||
// transport to inject `Authorization: Bearer <token>` per request.
|
// transport to inject `Authorization: Bearer <token>` per request.
|
||||||
|
|
@ -420,11 +423,17 @@ const LANGUAGE_PROVIDERS: ProviderRegistry = {
|
||||||
'azure-openai',
|
'azure-openai',
|
||||||
undefined,
|
undefined,
|
||||||
{ baseURL },
|
{ baseURL },
|
||||||
model,
|
deploymentId,
|
||||||
withBearerAuth(fetch, tokenProvider),
|
withBearerAuth(fetch, tokenProvider),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return buildOpenAiCompatible('azure-openai', undefined, { apiKey, baseURL }, model, fetch);
|
return buildOpenAiCompatible(
|
||||||
|
'azure-openai',
|
||||||
|
undefined,
|
||||||
|
{ apiKey, baseURL },
|
||||||
|
deploymentId,
|
||||||
|
fetch,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Classic Azure OpenAI (`*.openai.azure.com`, or `resourceName` only).
|
// Classic Azure OpenAI (`*.openai.azure.com`, or `resourceName` only).
|
||||||
|
|
@ -435,9 +444,10 @@ const LANGUAGE_PROVIDERS: ProviderRegistry = {
|
||||||
// selects the Responses API + the `/v1/` path, which Azure rejects with
|
// selects the Responses API + the `/v1/` path, which Azure rejects with
|
||||||
// "API version not supported" for date-based versions.
|
// "API version not supported" for date-based versions.
|
||||||
//
|
//
|
||||||
// Azure deployments are user-named and surfaced in the deployment-based
|
// Azure deployments are user-named and surfaced in the URL path on
|
||||||
// URL path. The catalog model id is not the deployment id, so prefer the
|
// both endpoint types. The catalog model id is not the deployment id,
|
||||||
// user's `deploymentName` when provided and fall back to the model id.
|
// so prefer the user's `deploymentName` when provided and fall back to
|
||||||
|
// the model id.
|
||||||
const { createAzure } = require('@ai-sdk/azure') as typeof import('@ai-sdk/azure');
|
const { createAzure } = require('@ai-sdk/azure') as typeof import('@ai-sdk/azure');
|
||||||
let normalizedBaseURL = baseURL;
|
let normalizedBaseURL = baseURL;
|
||||||
// SDK expects url like `https://resourceName.openai.azure.com/openai`
|
// SDK expects url like `https://resourceName.openai.azure.com/openai`
|
||||||
|
|
|
||||||
|
|
@ -75,9 +75,10 @@ export const PROVIDER_CREDENTIAL_SCHEMAS = {
|
||||||
*/
|
*/
|
||||||
endpointType: z.enum(['classic', 'foundry']).optional(),
|
endpointType: z.enum(['classic', 'foundry']).optional(),
|
||||||
/**
|
/**
|
||||||
* User-defined Azure deployment name for classic endpoints. The catalog
|
* User-defined Azure deployment name. The catalog model id is not the
|
||||||
* model id is not the deployment id, so the agent flow must carry this
|
* deployment id, so the agent flow must carry this separately. Used by
|
||||||
* separately. Only used by the classic branch.
|
* both the classic and Foundry branches; on Foundry it overrides the
|
||||||
|
* model id in the request path.
|
||||||
*/
|
*/
|
||||||
deploymentName: z.string().optional(),
|
deploymentName: z.string().optional(),
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -240,6 +240,9 @@ function createDelegateSubAgentRequest(
|
||||||
? { parentExecutionCounter: withoutMessageCount(ctx.executionCounter) }
|
? { parentExecutionCounter: withoutMessageCount(ctx.executionCounter) }
|
||||||
: {}),
|
: {}),
|
||||||
...(ctx.parentTelemetry !== undefined ? { parentTelemetry: ctx.parentTelemetry } : {}),
|
...(ctx.parentTelemetry !== undefined ? { parentTelemetry: ctx.parentTelemetry } : {}),
|
||||||
|
...(ctx.onGuardrailNotice !== undefined
|
||||||
|
? { parentOnGuardrailNotice: ctx.onGuardrailNotice }
|
||||||
|
: {}),
|
||||||
...(policy !== undefined ? { policy } : {}),
|
...(policy !== undefined ? { policy } : {}),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -477,6 +480,10 @@ function resolveDelegateSubAgentStatus(
|
||||||
// error, so the state decides which of the two this really was.
|
// error, so the state decides which of the two this really was.
|
||||||
return result.getState().status === 'cancelled' ? 'cancelled' : 'failed';
|
return result.getState().status === 'cancelled' ? 'cancelled' : 'failed';
|
||||||
}
|
}
|
||||||
|
// A child agent hit a guardrail stop.
|
||||||
|
if (result.finishReason === 'guardrail') {
|
||||||
|
return 'failed';
|
||||||
|
}
|
||||||
if (result.pendingSuspend !== undefined && result.pendingSuspend.length > 0) {
|
if (result.pendingSuspend !== undefined && result.pendingSuspend.length > 0) {
|
||||||
return 'suspended';
|
return 'suspended';
|
||||||
}
|
}
|
||||||
|
|
@ -497,6 +504,17 @@ export function failedDelegatedChildSuspendOutput(
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function guardrailStopMessage(code: string | undefined): string {
|
||||||
|
switch (code) {
|
||||||
|
case 'budget.session':
|
||||||
|
return 'The sub-agent run was stopped: the session cost cap is spent.';
|
||||||
|
case 'budget.monthly':
|
||||||
|
return 'The sub-agent run was stopped: the monthly budget is spent.';
|
||||||
|
default:
|
||||||
|
return `The sub-agent run was stopped by a guardrail (${code ?? 'unknown code'}).`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Map an agent {@link GenerateResult} into the delegate tool's output shape. */
|
/** Map an agent {@link GenerateResult} into the delegate tool's output shape. */
|
||||||
export function generateResultToDelegateSubAgentOutput(
|
export function generateResultToDelegateSubAgentOutput(
|
||||||
taskPath: SubAgentTaskPath,
|
taskPath: SubAgentTaskPath,
|
||||||
|
|
@ -518,7 +536,11 @@ export function generateResultToDelegateSubAgentOutput(
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
...(result.finishReason !== undefined ? { finishReason: result.finishReason } : {}),
|
...(result.finishReason !== undefined ? { finishReason: result.finishReason } : {}),
|
||||||
...(result.error !== undefined ? { error: stringifyUnknown(result.error) } : {}),
|
...(result.error !== undefined
|
||||||
|
? { error: stringifyUnknown(result.error) }
|
||||||
|
: result.finishReason === 'guardrail'
|
||||||
|
? { error: guardrailStopMessage(result.guardrail?.code) }
|
||||||
|
: {}),
|
||||||
...(status === 'suspended' && result.pendingSuspend !== undefined
|
...(status === 'suspended' && result.pendingSuspend !== undefined
|
||||||
? { pendingSuspend: result.pendingSuspend }
|
? { pendingSuspend: result.pendingSuspend }
|
||||||
: {}),
|
: {}),
|
||||||
|
|
|
||||||
|
|
@ -170,6 +170,7 @@ function createToolContext(
|
||||||
abortSignal: executionContext.abortSignal,
|
abortSignal: executionContext.abortSignal,
|
||||||
executionCounter: executionContext.executionCounter,
|
executionCounter: executionContext.executionCounter,
|
||||||
approvalContext: executionContext.approvalContext,
|
approvalContext: executionContext.approvalContext,
|
||||||
|
onGuardrailNotice: executionContext.onGuardrailNotice,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -401,6 +401,7 @@ export class ToolCallRunner {
|
||||||
continuation,
|
continuation,
|
||||||
resumeSchema,
|
resumeSchema,
|
||||||
onSuspend,
|
onSuspend,
|
||||||
|
onGuardrailNotice: params.guardrails?.onNotice,
|
||||||
}),
|
}),
|
||||||
abortSignal,
|
abortSignal,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -191,8 +191,9 @@ export class McpClient {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true when any configured server declares per-server approval
|
* Returns true when any configured server declares per-server approval
|
||||||
* requirements (`requireApproval: true` or a non-empty `requireApproval`
|
* requirements (`requireApproval: true`, a non-empty `requireApproval`
|
||||||
* string array). Does NOT require a network connection.
|
* string array, or a `configureTools` callback that is not marked
|
||||||
|
* `configureToolsNonInterrupting`). Does NOT require a network connection.
|
||||||
*
|
*
|
||||||
* Used by the Agent builder to validate checkpoint configuration before
|
* Used by the Agent builder to validate checkpoint configuration before
|
||||||
* attempting to connect.
|
* attempting to connect.
|
||||||
|
|
|
||||||
|
|
@ -475,21 +475,52 @@ Use the workflow SDK.`,
|
||||||
await Promise.resolve();
|
await Promise.resolve();
|
||||||
source.registry = {
|
source.registry = {
|
||||||
...source.registry,
|
...source.registry,
|
||||||
skills: source.registry.skills.map((skill) => ({
|
skills: source.registry.skills.map((skill) => ({ ...skill, hash: 'prepared-hash' })),
|
||||||
...skill,
|
|
||||||
path: '/workspace/skills/summarize_notes/SKILL.md',
|
|
||||||
directory: '/workspace/skills/summarize_notes',
|
|
||||||
})),
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
source.prepare = prepare;
|
source.prepare = prepare;
|
||||||
const loadTool = createSkillLoadTool(source);
|
const loadTool = createSkillLoadTool(source);
|
||||||
|
|
||||||
const loaded = skillLoadText(await loadTool.handler?.({ skillId: 'summarize_notes' }, {}));
|
const loaded = skillLoadText(await loadTool.handler?.({ skillId: 'summarize_notes' }, {}));
|
||||||
expect(loaded).toContain('/workspace/skills/summarize_notes');
|
expect(loaded).toContain('[Skill hash: "prepared-hash"]');
|
||||||
expect(prepare).toHaveBeenCalledTimes(1);
|
expect(prepare).toHaveBeenCalledTimes(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('does not show server file paths to the model', async () => {
|
||||||
|
const source = createRuntimeSkillSource([
|
||||||
|
{
|
||||||
|
id: 'summarize_notes',
|
||||||
|
name: 'Summarize notes',
|
||||||
|
description: 'Use for meeting notes.',
|
||||||
|
instructions: 'Extract decisions.',
|
||||||
|
path: '/usr/local/lib/node_modules/n8n/skills/summarize_notes/SKILL.md',
|
||||||
|
sourcePath: '/usr/local/lib/node_modules/n8n/skills/summarize_notes/SKILL.md',
|
||||||
|
directory: '/usr/local/lib/node_modules/n8n/skills/summarize_notes',
|
||||||
|
linkedFiles: {
|
||||||
|
references: [{ path: 'references/guide.md', bytes: 5, sha256: 'abc' }],
|
||||||
|
templates: [],
|
||||||
|
scripts: [],
|
||||||
|
assets: [],
|
||||||
|
examples: [],
|
||||||
|
other: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
source.loadFile = async (skillId, filePath) =>
|
||||||
|
await Promise.resolve({ skillId, filePath, content: 'Guide' });
|
||||||
|
const loadTool = createSkillLoadTool(source);
|
||||||
|
|
||||||
|
const skill = skillLoadText(await loadTool.handler?.({ skillId: 'summarize_notes' }, {}));
|
||||||
|
const file = await loadTool.handler?.(
|
||||||
|
{ skillId: 'summarize_notes', filePath: 'references/guide.md' },
|
||||||
|
{},
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(skill).toContain('Extract decisions.');
|
||||||
|
expect(file).toMatchObject({ success: true, content: 'Guide' });
|
||||||
|
expect(JSON.stringify([skill, file])).not.toContain('/usr/local/lib');
|
||||||
|
});
|
||||||
|
|
||||||
it('injects the agent skill catalog without preparing the runtime skill source', async () => {
|
it('injects the agent skill catalog without preparing the runtime skill source', async () => {
|
||||||
const source = createRuntimeSkillSource([
|
const source = createRuntimeSkillSource([
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user