Skip to content

Commit 008e517

Browse files
committed
First batch of real Native Ops
1 parent 639a37e commit 008e517

60 files changed

Lines changed: 1322 additions & 80 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# cache-delete-value
2+
3+
Delete one component-scoped cache value.
4+
5+
## Parameters
6+
7+
| Name | Type | Required | Default | Description |
8+
|------|------|----------|---------|-------------|
9+
| `component_id` | `str` | yes || Canonical component id namespace for the cache key. |
10+
| `key` | `str` | yes || Cache key within the component namespace. |
11+
12+
## Returns
13+
14+
`bool``true` when the delete operation completes.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"capability_id": "cache-delete-value",
3+
"kind": "native_op",
4+
"version": "1.0.0",
5+
"summary": "Delete one component-scoped cache value.",
6+
"enabled": true,
7+
"autonomy": 0,
8+
"requires_approval": true,
9+
"side_effects": ["writes_cache"],
10+
"required_capabilities": [],
11+
"input_schema": {
12+
"component_id": "string | The canonical component id namespace for the cache key.",
13+
"key": "string | The cache key within the component namespace."
14+
},
15+
"output_schema": "boolean | True when the cache delete operation completes.",
16+
"call_target": "service_cache_authority.delete_value"
17+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# cache-get-value
2+
3+
Get one component-scoped cache value by key.
4+
5+
## Parameters
6+
7+
| Name | Type | Required | Default | Description |
8+
|------|------|----------|---------|-------------|
9+
| `component_id` | `str` | yes || Canonical component id namespace for the cache key. |
10+
| `key` | `str` | yes || Cache key within the component namespace. |
11+
12+
## Returns
13+
14+
`CacheEntry | null` — the cache record when present, otherwise `null`.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"capability_id": "cache-get-value",
3+
"kind": "native_op",
4+
"version": "1.0.0",
5+
"summary": "Get one component-scoped cache value by key.",
6+
"enabled": true,
7+
"autonomy": 0,
8+
"requires_approval": false,
9+
"side_effects": [],
10+
"required_capabilities": [],
11+
"input_schema": {
12+
"component_id": "string | The canonical component id namespace for the cache key.",
13+
"key": "string | The cache key within the component namespace."
14+
},
15+
"output_schema": {
16+
"anyOf": [
17+
{
18+
"type": "object",
19+
"properties": {
20+
"component_id": {
21+
"type": "string",
22+
"description": "The canonical component id namespace for the cache key."
23+
},
24+
"key": {
25+
"type": "string",
26+
"description": "The cache key within the component namespace."
27+
},
28+
"value": {
29+
"type": "object",
30+
"description": "The JSON value stored for the key."
31+
},
32+
"ttl_seconds": {
33+
"anyOf": [
34+
{
35+
"type": "integer"
36+
},
37+
{
38+
"type": "null"
39+
}
40+
],
41+
"description": "The effective TTL recorded for the key when available."
42+
}
43+
},
44+
"required": ["component_id", "key", "value", "ttl_seconds"]
45+
},
46+
{
47+
"type": "null"
48+
}
49+
]
50+
},
51+
"call_target": "service_cache_authority.get_value"
52+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# cache-peek-queue
2+
3+
Peek next component-scoped queue value without removal.
4+
5+
## Parameters
6+
7+
| Name | Type | Required | Default | Description |
8+
|------|------|----------|---------|-------------|
9+
| `component_id` | `str` | yes || Canonical component id namespace for the queue. |
10+
| `queue` | `str` | yes || Queue name within the component namespace. |
11+
12+
## Returns
13+
14+
`QueueEntry | null` — the next queued value, or `null` when the queue is empty.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"capability_id": "cache-peek-queue",
3+
"kind": "native_op",
4+
"version": "1.0.0",
5+
"summary": "Peek next component-scoped queue value without removal.",
6+
"enabled": true,
7+
"autonomy": 0,
8+
"requires_approval": false,
9+
"side_effects": [],
10+
"required_capabilities": [],
11+
"input_schema": {
12+
"component_id": "string | The canonical component id namespace for the queue.",
13+
"queue": "string | The queue name within the component namespace."
14+
},
15+
"output_schema": {
16+
"anyOf": [
17+
{
18+
"type": "object",
19+
"properties": {
20+
"component_id": {
21+
"type": "string",
22+
"description": "The canonical component id namespace for the queue."
23+
},
24+
"queue": {
25+
"type": "string",
26+
"description": "The queue name within the component namespace."
27+
},
28+
"value": {
29+
"type": "object",
30+
"description": "The next queued JSON value."
31+
}
32+
},
33+
"required": ["component_id", "queue", "value"]
34+
},
35+
{
36+
"type": "null"
37+
}
38+
]
39+
},
40+
"call_target": "service_cache_authority.peek_queue"
41+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# cache-pop-queue
2+
3+
Pop one component-scoped queue value using FIFO order.
4+
5+
## Parameters
6+
7+
| Name | Type | Required | Default | Description |
8+
|------|------|----------|---------|-------------|
9+
| `component_id` | `str` | yes || Canonical component id namespace for the queue. |
10+
| `queue` | `str` | yes || Queue name within the component namespace. |
11+
12+
## Returns
13+
14+
`QueueEntry | null` — the next queued value, or `null` when the queue is empty.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"capability_id": "cache-pop-queue",
3+
"kind": "native_op",
4+
"version": "1.0.0",
5+
"summary": "Pop one component-scoped queue value using FIFO order.",
6+
"enabled": true,
7+
"autonomy": 0,
8+
"requires_approval": false,
9+
"side_effects": [],
10+
"required_capabilities": [],
11+
"input_schema": {
12+
"component_id": "string | The canonical component id namespace for the queue.",
13+
"queue": "string | The queue name within the component namespace."
14+
},
15+
"output_schema": {
16+
"anyOf": [
17+
{
18+
"type": "object",
19+
"properties": {
20+
"component_id": {
21+
"type": "string",
22+
"description": "The canonical component id namespace for the queue."
23+
},
24+
"queue": {
25+
"type": "string",
26+
"description": "The queue name within the component namespace."
27+
},
28+
"value": {
29+
"type": "object",
30+
"description": "The dequeued JSON value."
31+
}
32+
},
33+
"required": ["component_id", "queue", "value"]
34+
},
35+
{
36+
"type": "null"
37+
}
38+
]
39+
},
40+
"call_target": "service_cache_authority.pop_queue"
41+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# cache-push-queue
2+
3+
Push one component-scoped queue value.
4+
5+
## Parameters
6+
7+
| Name | Type | Required | Default | Description |
8+
|------|------|----------|---------|-------------|
9+
| `component_id` | `str` | yes || Canonical component id namespace for the queue. |
10+
| `queue` | `str` | yes || Queue name within the component namespace. |
11+
| `value` | `object` | yes || JSON-serializable value to enqueue. |
12+
13+
## Returns
14+
15+
`QueueDepth` — the queue depth snapshot after the push.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"capability_id": "cache-push-queue",
3+
"kind": "native_op",
4+
"version": "1.0.0",
5+
"summary": "Push one component-scoped queue value.",
6+
"enabled": true,
7+
"autonomy": 0,
8+
"requires_approval": true,
9+
"side_effects": ["writes_cache"],
10+
"required_capabilities": [],
11+
"input_schema": {
12+
"component_id": "string | The canonical component id namespace for the queue.",
13+
"queue": "string | The queue name within the component namespace.",
14+
"value": "object | The JSON-serializable value to enqueue."
15+
},
16+
"output_schema": {
17+
"component_id": "string | The canonical component id namespace for the queue.",
18+
"queue": "string | The queue name within the component namespace.",
19+
"size": "integer | The queue depth after the enqueue operation."
20+
},
21+
"call_target": "service_cache_authority.push_queue"
22+
}

0 commit comments

Comments
 (0)