@holon-run/agentinbox 0.6.0 → 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -7
- package/dist/src/adapters.js +61 -6
- package/dist/src/backend.js +4 -16
- package/dist/src/cli.js +307 -53
- package/dist/src/client.js +2 -2
- package/dist/src/daemon.js +36 -2
- package/dist/src/http.js +467 -45
- package/dist/src/logging.js +112 -0
- package/dist/src/paths.js +1 -0
- package/dist/src/runtime_gate.js +394 -63
- package/dist/src/service.js +856 -154
- package/dist/src/source_hosts.js +75 -0
- package/dist/src/source_resolution.js +20 -20
- package/dist/src/source_schema.js +2 -2
- package/dist/src/sources/feishu.js +66 -28
- package/dist/src/sources/github.js +188 -24
- package/dist/src/sources/remote.js +44 -24
- package/dist/src/sources/{remote_profiles.js → remote_modules.js} +143 -58
- package/dist/src/store.js +861 -106
- package/dist/src/terminal.js +33 -7
- package/dist/src/util.js +46 -1
- package/drizzle/migrations/{0000_initial.sql → 0000_v1_initial.sql} +182 -6
- package/drizzle/schema.ts +93 -1
- package/package.json +2 -1
- package/scripts/iterm2_cursor_probe.py +8 -3
- package/scripts/release_smoke.sh +123 -0
- package/drizzle/migrations/0001_inbox_items_source_occurred_at_idx.sql +0 -3
- package/drizzle/migrations/0002_subscription_cleanup_policy.sql +0 -45
- package/drizzle/migrations/0003_subscription_lifecycle_retirements.sql +0 -14
- package/drizzle/migrations/0004_source_idle_states.sql +0 -10
- package/drizzle/migrations/0005_timers.sql +0 -22
- package/drizzle/migrations/0006_terminal_runtime_pid.sql +0 -1
- package/drizzle/migrations/0007_activation_dispatch_last_notified_fingerprint.sql +0 -2
- package/drizzle/migrations/0008_inbox_item_sequence.sql +0 -21
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
create table subscriptions__new (
|
|
2
|
-
subscription_id text primary key,
|
|
3
|
-
agent_id text not null,
|
|
4
|
-
source_id text not null,
|
|
5
|
-
filter_json text not null,
|
|
6
|
-
tracked_resource_ref text,
|
|
7
|
-
cleanup_policy_json text not null,
|
|
8
|
-
start_policy text not null,
|
|
9
|
-
start_offset integer,
|
|
10
|
-
start_time text,
|
|
11
|
-
created_at text not null
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
insert into subscriptions__new (
|
|
15
|
-
subscription_id,
|
|
16
|
-
agent_id,
|
|
17
|
-
source_id,
|
|
18
|
-
filter_json,
|
|
19
|
-
tracked_resource_ref,
|
|
20
|
-
cleanup_policy_json,
|
|
21
|
-
start_policy,
|
|
22
|
-
start_offset,
|
|
23
|
-
start_time,
|
|
24
|
-
created_at
|
|
25
|
-
)
|
|
26
|
-
select
|
|
27
|
-
subscription_id,
|
|
28
|
-
agent_id,
|
|
29
|
-
source_id,
|
|
30
|
-
filter_json,
|
|
31
|
-
null as tracked_resource_ref,
|
|
32
|
-
case
|
|
33
|
-
when expires_at is not null then json_object('mode', 'at', 'at', expires_at)
|
|
34
|
-
when lifecycle_mode = 'temporary' then json_object('mode', 'manual')
|
|
35
|
-
else json_object('mode', 'manual')
|
|
36
|
-
end as cleanup_policy_json,
|
|
37
|
-
start_policy,
|
|
38
|
-
start_offset,
|
|
39
|
-
start_time,
|
|
40
|
-
created_at
|
|
41
|
-
from subscriptions;
|
|
42
|
-
|
|
43
|
-
drop table subscriptions;
|
|
44
|
-
|
|
45
|
-
alter table subscriptions__new rename to subscriptions;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
create table if not exists subscription_lifecycle_retirements (
|
|
2
|
-
subscription_id text primary key,
|
|
3
|
-
source_id text not null,
|
|
4
|
-
tracked_resource_ref text not null,
|
|
5
|
-
retire_at text not null,
|
|
6
|
-
terminal_state text,
|
|
7
|
-
terminal_result text,
|
|
8
|
-
terminal_occurred_at text,
|
|
9
|
-
created_at text not null,
|
|
10
|
-
updated_at text not null
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
create index if not exists idx_subscription_lifecycle_retirements_retire_at
|
|
14
|
-
on subscription_lifecycle_retirements(retire_at);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
create table if not exists source_idle_states (
|
|
2
|
-
source_id text primary key not null,
|
|
3
|
-
idle_since text not null,
|
|
4
|
-
auto_pause_at text not null,
|
|
5
|
-
auto_paused_at text,
|
|
6
|
-
updated_at text not null
|
|
7
|
-
);
|
|
8
|
-
|
|
9
|
-
create index if not exists idx_source_idle_states_auto_pause_at
|
|
10
|
-
on source_idle_states(auto_pause_at);
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
create table if not exists timers (
|
|
2
|
-
schedule_id text primary key not null,
|
|
3
|
-
agent_id text not null,
|
|
4
|
-
status text not null,
|
|
5
|
-
mode text not null,
|
|
6
|
-
at text,
|
|
7
|
-
interval_ms integer,
|
|
8
|
-
cron_expr text,
|
|
9
|
-
timezone text not null,
|
|
10
|
-
message text not null,
|
|
11
|
-
sender text,
|
|
12
|
-
next_fire_at text,
|
|
13
|
-
last_fired_at text,
|
|
14
|
-
created_at text not null,
|
|
15
|
-
updated_at text not null
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
create index if not exists idx_timers_agent_next_fire_at
|
|
19
|
-
on timers(agent_id, next_fire_at);
|
|
20
|
-
|
|
21
|
-
create index if not exists idx_timers_next_fire_at
|
|
22
|
-
on timers(next_fire_at);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
alter table activation_targets add column runtime_pid integer;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
alter table inbox_items add column inbox_sequence integer;
|
|
2
|
-
|
|
3
|
-
update inbox_items
|
|
4
|
-
set inbox_sequence = rowid
|
|
5
|
-
where inbox_sequence is null;
|
|
6
|
-
|
|
7
|
-
create unique index if not exists idx_inbox_items_inbox_sequence
|
|
8
|
-
on inbox_items(inbox_sequence);
|
|
9
|
-
|
|
10
|
-
create index if not exists idx_inbox_items_inbox_sequence_order
|
|
11
|
-
on inbox_items(inbox_id, inbox_sequence);
|
|
12
|
-
|
|
13
|
-
create trigger if not exists trg_inbox_items_set_sequence_after_insert
|
|
14
|
-
after insert on inbox_items
|
|
15
|
-
for each row
|
|
16
|
-
when new.inbox_sequence is null
|
|
17
|
-
begin
|
|
18
|
-
update inbox_items
|
|
19
|
-
set inbox_sequence = new.rowid
|
|
20
|
-
where rowid = new.rowid;
|
|
21
|
-
end;
|