Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .agents/skills/orm-infra/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: orm-infra
description: ORM client for the infra API — provides typed CRUD operations for 6 tables and 1 custom operations
---

# orm-infra

<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->

ORM client for the infra API — provides typed CRUD operations for 6 tables and 1 custom operations

## Usage

```typescript
// Import the ORM client
import { db } from './orm';

// Available models: platformSecretDefinition, platformFunctionExecutionLog, platformNamespace, platformFunctionInvocation, platformNamespaceEvent, platformFunctionDefinition
db.<model>.findMany({ select: { id: true } }).execute()
db.<model>.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.<model>.create({ data: { ... }, select: { id: true } }).execute()
db.<model>.update({ where: { id: '<UUID>' }, data: { ... }, select: { id: true } }).execute()
db.<model>.delete({ where: { id: '<UUID>' } }).execute()
```

## Examples

### Query records

```typescript
const items = await db.platformSecretDefinition.findMany({
select: { id: true }
}).execute();
```

## References

See the `references/` directory for detailed per-entity API documentation:

- [platform-secret-definition](references/platform-secret-definition.md)
- [platform-function-execution-log](references/platform-function-execution-log.md)
- [platform-namespace](references/platform-namespace.md)
- [platform-function-invocation](references/platform-function-invocation.md)
- [platform-namespace-event](references/platform-namespace-event.md)
- [platform-function-definition](references/platform-function-definition.md)
- [provision-bucket](references/provision-bucket.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# platformFunctionDefinition

<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->

Function definitions — registered cloud functions with routing, queue, and retry configuration

## Usage

```typescript
db.platformFunctionDefinition.findMany({ select: { id: true } }).execute()
db.platformFunctionDefinition.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.platformFunctionDefinition.create({ data: { description: '<String>', isBuiltIn: '<Boolean>', isInvocable: '<Boolean>', maxAttempts: '<Int>', name: '<String>', namespaceId: '<UUID>', priority: '<Int>', queueName: '<String>', scope: '<String>', serviceUrl: '<String>', taskIdentifier: '<String>', payloadSchema: '<JSON>', requiredConfigs: '<FunctionRequirement>', requiredSecrets: '<FunctionRequirement>' }, select: { id: true } }).execute()
db.platformFunctionDefinition.update({ where: { id: '<UUID>' }, data: { description: '<String>' }, select: { id: true } }).execute()
db.platformFunctionDefinition.delete({ where: { id: '<UUID>' } }).execute()
```

## Examples

### List all platformFunctionDefinition records

```typescript
const items = await db.platformFunctionDefinition.findMany({
select: { id: true, description: true }
}).execute();
```

### Create a platformFunctionDefinition

```typescript
const item = await db.platformFunctionDefinition.create({
data: { description: '<String>', isBuiltIn: '<Boolean>', isInvocable: '<Boolean>', maxAttempts: '<Int>', name: '<String>', namespaceId: '<UUID>', priority: '<Int>', queueName: '<String>', scope: '<String>', serviceUrl: '<String>', taskIdentifier: '<String>', payloadSchema: '<JSON>', requiredConfigs: '<FunctionRequirement>', requiredSecrets: '<FunctionRequirement>' },
select: { id: true }
}).execute();
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# platformFunctionExecutionLog

<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->

Function execution logs — structured console output per invocation

## Usage

```typescript
db.platformFunctionExecutionLog.findMany({ select: { id: true } }).execute()
db.platformFunctionExecutionLog.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.platformFunctionExecutionLog.create({ data: { actorId: '<UUID>', databaseId: '<UUID>', invocationId: '<UUID>', logLevel: '<String>', message: '<String>', metadata: '<JSON>', taskIdentifier: '<String>' }, select: { id: true } }).execute()
db.platformFunctionExecutionLog.update({ where: { id: '<UUID>' }, data: { actorId: '<UUID>' }, select: { id: true } }).execute()
db.platformFunctionExecutionLog.delete({ where: { id: '<UUID>' } }).execute()
```

## Examples

### List all platformFunctionExecutionLog records

```typescript
const items = await db.platformFunctionExecutionLog.findMany({
select: { id: true, actorId: true }
}).execute();
```

### Create a platformFunctionExecutionLog

```typescript
const item = await db.platformFunctionExecutionLog.create({
data: { actorId: '<UUID>', databaseId: '<UUID>', invocationId: '<UUID>', logLevel: '<String>', message: '<String>', metadata: '<JSON>', taskIdentifier: '<String>' },
select: { id: true }
}).execute();
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# platformFunctionInvocation

<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->

Function invocation log — INSERT to call a function (business-layer, metered)

## Usage

```typescript
db.platformFunctionInvocation.findMany({ select: { id: true } }).execute()
db.platformFunctionInvocation.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.platformFunctionInvocation.create({ data: { actorId: '<UUID>', completedAt: '<Datetime>', databaseId: '<UUID>', durationMs: '<Int>', error: '<String>', functionId: '<UUID>', jobId: '<BigInt>', payload: '<JSON>', result: '<JSON>', startedAt: '<Datetime>', status: '<String>', taskIdentifier: '<String>' }, select: { id: true } }).execute()
db.platformFunctionInvocation.update({ where: { id: '<UUID>' }, data: { actorId: '<UUID>' }, select: { id: true } }).execute()
db.platformFunctionInvocation.delete({ where: { id: '<UUID>' } }).execute()
```

## Examples

### List all platformFunctionInvocation records

```typescript
const items = await db.platformFunctionInvocation.findMany({
select: { id: true, actorId: true }
}).execute();
```

### Create a platformFunctionInvocation

```typescript
const item = await db.platformFunctionInvocation.create({
data: { actorId: '<UUID>', completedAt: '<Datetime>', databaseId: '<UUID>', durationMs: '<Int>', error: '<String>', functionId: '<UUID>', jobId: '<BigInt>', payload: '<JSON>', result: '<JSON>', startedAt: '<Datetime>', status: '<String>', taskIdentifier: '<String>' },
select: { id: true }
}).execute();
```
34 changes: 34 additions & 0 deletions .agents/skills/orm-infra/references/platform-namespace-event.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# platformNamespaceEvent

<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->

Namespace lifecycle events — audit log of creation, activation, deactivation, label changes

## Usage

```typescript
db.platformNamespaceEvent.findMany({ select: { id: true } }).execute()
db.platformNamespaceEvent.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.platformNamespaceEvent.create({ data: { actorId: '<UUID>', cpuMillicores: '<Int>', databaseId: '<UUID>', eventType: '<String>', memoryBytes: '<BigInt>', message: '<String>', metadata: '<JSON>', metrics: '<JSON>', namespaceId: '<UUID>', networkEgressBytes: '<BigInt>', networkIngressBytes: '<BigInt>', podCount: '<Int>', storageBytes: '<BigInt>' }, select: { id: true } }).execute()
db.platformNamespaceEvent.update({ where: { id: '<UUID>' }, data: { actorId: '<UUID>' }, select: { id: true } }).execute()
db.platformNamespaceEvent.delete({ where: { id: '<UUID>' } }).execute()
```

## Examples

### List all platformNamespaceEvent records

```typescript
const items = await db.platformNamespaceEvent.findMany({
select: { id: true, actorId: true }
}).execute();
```

### Create a platformNamespaceEvent

```typescript
const item = await db.platformNamespaceEvent.create({
data: { actorId: '<UUID>', cpuMillicores: '<Int>', databaseId: '<UUID>', eventType: '<String>', memoryBytes: '<BigInt>', message: '<String>', metadata: '<JSON>', metrics: '<JSON>', namespaceId: '<UUID>', networkEgressBytes: '<BigInt>', networkIngressBytes: '<BigInt>', podCount: '<Int>', storageBytes: '<BigInt>' },
select: { id: true }
}).execute();
```
34 changes: 34 additions & 0 deletions .agents/skills/orm-infra/references/platform-namespace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# platformNamespace

<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->

Logical namespace containers for grouping secrets, config, functions, and other resources

## Usage

```typescript
db.platformNamespace.findMany({ select: { id: true } }).execute()
db.platformNamespace.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.platformNamespace.create({ data: { annotations: '<JSON>', databaseId: '<UUID>', description: '<String>', isActive: '<Boolean>', labels: '<JSON>', name: '<String>', namespaceName: '<String>' }, select: { id: true } }).execute()
db.platformNamespace.update({ where: { id: '<UUID>' }, data: { annotations: '<JSON>' }, select: { id: true } }).execute()
db.platformNamespace.delete({ where: { id: '<UUID>' } }).execute()
```

## Examples

### List all platformNamespace records

```typescript
const items = await db.platformNamespace.findMany({
select: { id: true, annotations: true }
}).execute();
```

### Create a platformNamespace

```typescript
const item = await db.platformNamespace.create({
data: { annotations: '<JSON>', databaseId: '<UUID>', description: '<String>', isActive: '<Boolean>', labels: '<JSON>', name: '<String>', namespaceName: '<String>' },
select: { id: true }
}).execute();
```
34 changes: 34 additions & 0 deletions .agents/skills/orm-infra/references/platform-secret-definition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# platformSecretDefinition

<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->

Global secret name registry — declares which secrets the platform recognizes. Actual values live in app_secrets.

## Usage

```typescript
db.platformSecretDefinition.findMany({ select: { id: true } }).execute()
db.platformSecretDefinition.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.platformSecretDefinition.create({ data: { annotations: '<JSON>', databaseId: '<UUID>', description: '<String>', isBuiltIn: '<Boolean>', labels: '<JSON>', name: '<String>' }, select: { id: true } }).execute()
db.platformSecretDefinition.update({ where: { id: '<UUID>' }, data: { annotations: '<JSON>' }, select: { id: true } }).execute()
db.platformSecretDefinition.delete({ where: { id: '<UUID>' } }).execute()
```

## Examples

### List all platformSecretDefinition records

```typescript
const items = await db.platformSecretDefinition.findMany({
select: { id: true, annotations: true }
}).execute();
```

### Create a platformSecretDefinition

```typescript
const item = await db.platformSecretDefinition.create({
data: { annotations: '<JSON>', databaseId: '<UUID>', description: '<String>', isBuiltIn: '<Boolean>', labels: '<JSON>', name: '<String>' },
select: { id: true }
}).execute();
```
22 changes: 22 additions & 0 deletions .agents/skills/orm-infra/references/provision-bucket.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# provisionBucket

<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->

Provision an S3 bucket for a logical bucket in the database.
Reads the bucket config via RLS, then creates and configures
the S3 bucket with the appropriate privacy policies, CORS rules,
and lifecycle settings.

## Usage

```typescript
db.mutation.provisionBucket({ input: { bucketKey: '<String>', ownerId: '<UUID>' } }).execute()
```

## Examples

### Run provisionBucket

```typescript
const result = await db.mutation.provisionBucket({ input: { bucketKey: '<String>', ownerId: '<UUID>' } }).execute();
```
Loading