archal 0.9.19 → 0.9.20

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.
Files changed (92) hide show
  1. package/README.md +9 -1
  2. package/agents/github-octokit/.archal.json +8 -0
  3. package/agents/github-octokit/Dockerfile +8 -0
  4. package/agents/github-octokit/README.md +113 -0
  5. package/agents/github-octokit/agent.mjs +54 -0
  6. package/agents/github-octokit/package.json +9 -0
  7. package/agents/github-octokit/scenarios/test-repo-access.md +27 -0
  8. package/agents/google-workspace-local-tools/Dockerfile +6 -0
  9. package/agents/google-workspace-local-tools/README.md +58 -0
  10. package/agents/google-workspace-local-tools/agent.mjs +196 -0
  11. package/agents/google-workspace-local-tools/archal-harness.json +7 -0
  12. package/agents/google-workspace-local-tools/run-input.yaml +16 -0
  13. package/agents/google-workspace-local-tools/scenario.md +29 -0
  14. package/agents/hermes/.archal.json +8 -0
  15. package/agents/hermes/Dockerfile +46 -0
  16. package/agents/hermes/README.md +87 -0
  17. package/agents/hermes/SOUL.md +27 -0
  18. package/agents/hermes/config.yaml +34 -0
  19. package/agents/hermes/drive.mjs +113 -0
  20. package/agents/hermes/scenarios/stripe-customers-read-only.md +32 -0
  21. package/agents/openclaw/.archal.json +8 -0
  22. package/agents/openclaw/Dockerfile +96 -0
  23. package/agents/openclaw/README.md +120 -0
  24. package/agents/openclaw/drive.mjs +311 -0
  25. package/agents/openclaw/package.json +9 -0
  26. package/agents/openclaw/scenarios/github-issue-triage-read-only.md +44 -0
  27. package/agents/openclaw/workspace/AGENTS.md +23 -0
  28. package/agents/openclaw/workspace/IDENTITY.md +8 -0
  29. package/agents/openclaw/workspace/SOUL.md +14 -0
  30. package/agents/openclaw/workspace/TOOLS.md +35 -0
  31. package/agents/pagination-test/README.md +24 -0
  32. package/agents/pagination-test/scenario.md +24 -0
  33. package/agents/replay-capsule-harness/README.md +29 -0
  34. package/agents/replay-capsule-harness/observability-install-offline-e2e.mts +1517 -0
  35. package/agents/replay-capsule-harness/replay-capsule-e2e.mjs +104 -0
  36. package/clone-assets/apify/tools.json +256 -22
  37. package/clone-assets/calcom/tools.json +510 -0
  38. package/clone-assets/clickup/tools.json +1258 -0
  39. package/clone-assets/customerio/tools.json +386 -0
  40. package/clone-assets/datadog/tools.json +734 -0
  41. package/clone-assets/github/tools.json +306 -25
  42. package/clone-assets/gitlab/tools.json +999 -0
  43. package/clone-assets/google-workspace/tools.json +18 -6
  44. package/clone-assets/hubspot/tools.json +1406 -0
  45. package/clone-assets/jira/fidelity.json +1 -1
  46. package/clone-assets/jira/tools.json +266 -543
  47. package/clone-assets/linear/tools.json +238 -40
  48. package/clone-assets/ownerrez/tools.json +548 -0
  49. package/clone-assets/pricelabs/tools.json +343 -0
  50. package/clone-assets/sentry/tools.json +745 -0
  51. package/clone-assets/slack/tools.json +1 -2
  52. package/clone-assets/stripe/tools.json +185 -46
  53. package/clone-assets/supabase/tools.json +437 -0
  54. package/clone-assets/unipile/tools.json +408 -0
  55. package/clone-assets/webflow/tools.json +415 -0
  56. package/dist/autoloop-worker-types-BEb_E44z.d.cts +196 -0
  57. package/dist/cli.cjs +150299 -87430
  58. package/dist/commands/autoloop-hosted-worker.cjs +43942 -0
  59. package/dist/commands/autoloop-hosted-worker.d.cts +143 -0
  60. package/dist/commands/autoloop-pr-verification.cjs +4227 -0
  61. package/dist/commands/autoloop-pr-verification.d.cts +17 -0
  62. package/dist/{vitest/chunk-L36NXAU6.js → commands/autoloop-result-parser.cjs} +16445 -18852
  63. package/dist/commands/autoloop-result-parser.d.cts +39 -0
  64. package/dist/commands/autoloop-worker.cjs +36163 -0
  65. package/dist/commands/autoloop-worker.d.cts +97 -0
  66. package/dist/harness.cjs +1 -0
  67. package/dist/index.cjs +1 -1
  68. package/dist/replay.cjs +49624 -0
  69. package/dist/replay.d.cts +4625 -0
  70. package/dist/scenarios.cjs +80343 -0
  71. package/dist/scenarios.d.cts +562 -0
  72. package/dist/vitest/chunk-6CBYFCFK.js +4667 -0
  73. package/dist/vitest/chunk-ARVS45PP.js +2764 -0
  74. package/dist/vitest/index.cjs +6011 -75261
  75. package/dist/vitest/index.d.ts +7 -6
  76. package/dist/vitest/index.js +8 -8
  77. package/dist/vitest/runtime/hosted-session-reaper.cjs +792 -34359
  78. package/dist/vitest/runtime/hosted-session-reaper.js +1 -1
  79. package/dist/vitest/runtime/setup-files.js +2 -2
  80. package/package.json +8 -3
  81. package/skills/archal-agent/SKILL.md +87 -0
  82. package/skills/{attach → autoloop}/SKILL.md +94 -120
  83. package/skills/autoloop/references/hosted-sources.md +62 -0
  84. package/skills/autoloop/references/trace-schema-mapping.md +73 -0
  85. package/skills/eval/SKILL.md +35 -1
  86. package/skills/install-agent/SKILL.md +221 -0
  87. package/skills/onboard/SKILL.md +73 -5
  88. package/skills/scenario/SKILL.md +19 -4
  89. package/skills/seed/SKILL.md +237 -0
  90. package/dist/seed/dynamic-generator.cjs +0 -45687
  91. package/dist/seed/dynamic-generator.d.cts +0 -106
  92. package/dist/vitest/chunk-WZ7SA4CK.js +0 -47369
@@ -0,0 +1,104 @@
1
+ #!/usr/bin/env node
2
+ import { randomBytes } from 'node:crypto';
3
+ import { mkdir, writeFile } from 'node:fs/promises';
4
+ import { dirname, resolve } from 'node:path';
5
+
6
+ const repo = process.env.ARCHAL_REPLAY_E2E_REPO || 'vercel/next.js';
7
+ const outputPath = resolve(
8
+ process.env.ARCHAL_REPLAY_E2E_OUT || '/tmp/archal-replay-capsule-otlp.json',
9
+ );
10
+
11
+ function nowNanos(offsetMs = 0) {
12
+ return String((Date.now() + offsetMs) * 1_000_000);
13
+ }
14
+
15
+ function attr(key, value) {
16
+ return { key, value: { stringValue: typeof value === 'string' ? value : JSON.stringify(value) } };
17
+ }
18
+
19
+ async function fetchRepoSnapshot() {
20
+ const response = await fetch(`https://api.github.com/repos/${repo}`, {
21
+ headers: {
22
+ accept: 'application/vnd.github+json',
23
+ 'user-agent': 'archal-replay-capsule-e2e',
24
+ },
25
+ });
26
+ if (!response.ok) {
27
+ throw new Error(`GitHub repo snapshot failed: ${response.status} ${response.statusText}`);
28
+ }
29
+ const body = await response.json();
30
+ return {
31
+ id: body.id,
32
+ fullName: body.full_name,
33
+ private: body.private,
34
+ archived: body.archived,
35
+ defaultBranch: body.default_branch,
36
+ pushedAt: body.pushed_at,
37
+ openIssuesCount: body.open_issues_count,
38
+ };
39
+ }
40
+
41
+ const beforeRepo = await fetchRepoSnapshot();
42
+ const afterRepo = { ...beforeRepo };
43
+ const traceId = randomBytes(16).toString('hex');
44
+ const spanId = randomBytes(8).toString('hex');
45
+ const prompt = `Report whether ${repo} is archived.`;
46
+ // Deliberately wrong when the repository is not archived, so the generated
47
+ // trace is a reproducible failed behavior with a real service snapshot.
48
+ const completion = `${repo} is archived: ${String(!beforeRepo.archived)}`;
49
+
50
+ const replayCapsule = {
51
+ schema: 'archal.trace.replay-capsule',
52
+ version: 1,
53
+ stateBefore: { github: { repositories: [beforeRepo] } },
54
+ stateAfter: { github: { repositories: [afterRepo] } },
55
+ stateDiff: { github: {} },
56
+ serviceReadSet: [{ service: 'github', type: 'repository', id: beforeRepo.fullName }],
57
+ resourceRefs: [{ service: 'github', type: 'repository', id: beforeRepo.fullName }],
58
+ serviceOperations: [{
59
+ service: 'github',
60
+ operation: 'repos.get',
61
+ resourceRefs: [{ service: 'github', type: 'repository', id: beforeRepo.fullName }],
62
+ response: beforeRepo,
63
+ }],
64
+ authPrincipal: { kind: 'anonymous', scopes: [] },
65
+ modelConfig: { provider: 'local-harness', model: 'deterministic-fixture' },
66
+ promptBundle: { task: prompt },
67
+ };
68
+
69
+ const otlpPayload = {
70
+ resourceSpans: [{
71
+ resource: {
72
+ attributes: [
73
+ attr('service.name', 'archal-replay-capsule-e2e'),
74
+ ],
75
+ },
76
+ scopeSpans: [{
77
+ scope: { attributes: [] },
78
+ spans: [{
79
+ traceId,
80
+ spanId,
81
+ name: 'github.repos.get',
82
+ startTimeUnixNano: nowNanos(-250),
83
+ endTimeUnixNano: nowNanos(),
84
+ attributes: [
85
+ attr('gen_ai.prompt', prompt),
86
+ attr('gen_ai.completion', completion),
87
+ attr('archal.replay.capsule', replayCapsule),
88
+ ],
89
+ }],
90
+ }],
91
+ }],
92
+ };
93
+
94
+ await mkdir(dirname(outputPath), { recursive: true });
95
+ await writeFile(outputPath, `${JSON.stringify(otlpPayload, null, 2)}\n`);
96
+
97
+ process.stdout.write(JSON.stringify({
98
+ ok: true,
99
+ outputPath,
100
+ traceId,
101
+ repo: beforeRepo.fullName,
102
+ archived: beforeRepo.archived,
103
+ }, null, 2));
104
+ process.stdout.write('\n');
@@ -1,6 +1,138 @@
1
1
  {
2
2
  "clone": "apify",
3
3
  "tools": [
4
+ {
5
+ "name": "apify_list_acts",
6
+ "description": "Lists actors created during the session.",
7
+ "inputSchema": {
8
+ "type": "object",
9
+ "properties": {},
10
+ "additionalProperties": true
11
+ },
12
+ "hidden": false
13
+ },
14
+ {
15
+ "name": "apify_post_v2_acts",
16
+ "description": "Creates an actor persisted in session state.",
17
+ "inputSchema": {
18
+ "type": "object",
19
+ "properties": {},
20
+ "additionalProperties": true
21
+ },
22
+ "hidden": false
23
+ },
24
+ {
25
+ "name": "apify_get_act",
26
+ "description": "Gets an actor by id from session state.",
27
+ "inputSchema": {
28
+ "type": "object",
29
+ "properties": {
30
+ "actorId": {
31
+ "type": "string"
32
+ }
33
+ },
34
+ "required": [
35
+ "actorId"
36
+ ],
37
+ "additionalProperties": true
38
+ },
39
+ "hidden": false
40
+ },
41
+ {
42
+ "name": "apify_update_act",
43
+ "description": "Updates an actor persisted in session state.",
44
+ "inputSchema": {
45
+ "type": "object",
46
+ "properties": {
47
+ "actorId": {
48
+ "type": "string"
49
+ }
50
+ },
51
+ "required": [
52
+ "actorId"
53
+ ],
54
+ "additionalProperties": true
55
+ },
56
+ "hidden": false
57
+ },
58
+ {
59
+ "name": "apify_get_v2_actor_builds",
60
+ "description": "Lists actor builds in an Apify-shaped empty collection.",
61
+ "inputSchema": {
62
+ "type": "object",
63
+ "properties": {},
64
+ "additionalProperties": true
65
+ },
66
+ "hidden": false
67
+ },
68
+ {
69
+ "name": "apify_list_actor_builds",
70
+ "description": "Lists builds for an actor in an Apify-shaped collection.",
71
+ "inputSchema": {
72
+ "type": "object",
73
+ "properties": {
74
+ "actorId": {
75
+ "type": "string"
76
+ }
77
+ },
78
+ "required": [
79
+ "actorId"
80
+ ],
81
+ "additionalProperties": true
82
+ },
83
+ "hidden": false
84
+ },
85
+ {
86
+ "name": "apify_list_actor_runs",
87
+ "description": "Lists runs for an actor in an Apify-shaped collection.",
88
+ "inputSchema": {
89
+ "type": "object",
90
+ "properties": {
91
+ "actorId": {
92
+ "type": "string"
93
+ }
94
+ },
95
+ "required": [
96
+ "actorId"
97
+ ],
98
+ "additionalProperties": true
99
+ },
100
+ "hidden": false
101
+ },
102
+ {
103
+ "name": "apify_list_actor_versions",
104
+ "description": "Lists versions for an actor in an Apify-shaped collection.",
105
+ "inputSchema": {
106
+ "type": "object",
107
+ "properties": {
108
+ "actorId": {
109
+ "type": "string"
110
+ }
111
+ },
112
+ "required": [
113
+ "actorId"
114
+ ],
115
+ "additionalProperties": true
116
+ },
117
+ "hidden": false
118
+ },
119
+ {
120
+ "name": "apify_list_actor_tasks",
121
+ "description": "Lists tasks for an actor in an Apify-shaped collection.",
122
+ "inputSchema": {
123
+ "type": "object",
124
+ "properties": {
125
+ "actorId": {
126
+ "type": "string"
127
+ }
128
+ },
129
+ "required": [
130
+ "actorId"
131
+ ],
132
+ "additionalProperties": true
133
+ },
134
+ "hidden": false
135
+ },
4
136
  {
5
137
  "name": "apify_stateful_list_datasets",
6
138
  "description": "Lists datasets including datasets created during the session.",
@@ -89,6 +221,23 @@
89
221
  },
90
222
  "hidden": false
91
223
  },
224
+ {
225
+ "name": "apify_stateful_get_dataset_statistics",
226
+ "description": "Returns dataset statistics for a stateful dataset.",
227
+ "inputSchema": {
228
+ "type": "object",
229
+ "properties": {
230
+ "datasetId": {
231
+ "type": "string"
232
+ }
233
+ },
234
+ "required": [
235
+ "datasetId"
236
+ ],
237
+ "additionalProperties": true
238
+ },
239
+ "hidden": false
240
+ },
92
241
  {
93
242
  "name": "apify_stateful_list_key_value_stores",
94
243
  "description": "Lists key-value stores created during the session.",
@@ -474,7 +623,28 @@
474
623
  },
475
624
  {
476
625
  "name": "apify_stateful_delete_request_queue_request",
477
- "description": "Deletes a request by id from a queue.",
626
+ "description": "Back-compat alias for DELETE request lock semantics.",
627
+ "inputSchema": {
628
+ "type": "object",
629
+ "properties": {
630
+ "queueId": {
631
+ "type": "string"
632
+ },
633
+ "requestId": {
634
+ "type": "string"
635
+ }
636
+ },
637
+ "required": [
638
+ "queueId",
639
+ "requestId"
640
+ ],
641
+ "additionalProperties": true
642
+ },
643
+ "hidden": false
644
+ },
645
+ {
646
+ "name": "apify_stateful_delete_request_queue_request_lock",
647
+ "description": "Unlocks a request by id in a queue via DELETE /lock semantics.",
478
648
  "inputSchema": {
479
649
  "type": "object",
480
650
  "properties": {
@@ -511,8 +681,8 @@
511
681
  "hidden": false
512
682
  },
513
683
  {
514
- "name": "apify_get_user",
515
- "description": "Returns the recorded REST response for apify_get_user.",
684
+ "name": "apify_stateful_create_schedule",
685
+ "description": "Creates a schedule persisted in session state.",
516
686
  "inputSchema": {
517
687
  "type": "object",
518
688
  "properties": {},
@@ -521,28 +691,42 @@
521
691
  "hidden": false
522
692
  },
523
693
  {
524
- "name": "apify_list_acts",
525
- "description": "Returns the recorded REST response for apify_list_acts.",
694
+ "name": "apify_stateful_get_schedule",
695
+ "description": "Gets a schedule by id from session state.",
526
696
  "inputSchema": {
527
697
  "type": "object",
528
- "properties": {},
698
+ "properties": {
699
+ "scheduleId": {
700
+ "type": "string"
701
+ }
702
+ },
703
+ "required": [
704
+ "scheduleId"
705
+ ],
529
706
  "additionalProperties": true
530
707
  },
531
708
  "hidden": false
532
709
  },
533
710
  {
534
- "name": "apify_get_act",
535
- "description": "Returns the recorded REST response for apify_get_act.",
711
+ "name": "apify_stateful_delete_schedule",
712
+ "description": "Deletes a schedule by id from session state.",
536
713
  "inputSchema": {
537
714
  "type": "object",
538
- "properties": {},
715
+ "properties": {
716
+ "scheduleId": {
717
+ "type": "string"
718
+ }
719
+ },
720
+ "required": [
721
+ "scheduleId"
722
+ ],
539
723
  "additionalProperties": true
540
724
  },
541
725
  "hidden": false
542
726
  },
543
727
  {
544
- "name": "apify_update_act",
545
- "description": "Returns the recorded REST response for apify_update_act.",
728
+ "name": "apify_get_user",
729
+ "description": "Gets the authenticated Apify user profile.",
546
730
  "inputSchema": {
547
731
  "type": "object",
548
732
  "properties": {},
@@ -552,7 +736,7 @@
552
736
  },
553
737
  {
554
738
  "name": "apify_abort_build",
555
- "description": "Returns the recorded REST response for apify_abort_build.",
739
+ "description": "Returns Apify-shaped not-found for unmodeled build aborts.",
556
740
  "inputSchema": {
557
741
  "type": "object",
558
742
  "properties": {},
@@ -562,7 +746,7 @@
562
746
  },
563
747
  {
564
748
  "name": "apify_get_build_openapi",
565
- "description": "Returns the recorded REST response for apify_get_build_openapi.",
749
+ "description": "Returns Apify-shaped not-found for unmodeled actor build OpenAPI specs.",
566
750
  "inputSchema": {
567
751
  "type": "object",
568
752
  "properties": {},
@@ -572,7 +756,7 @@
572
756
  },
573
757
  {
574
758
  "name": "apify_list_runs",
575
- "description": "Returns the recorded REST response for apify_list_runs.",
759
+ "description": "Lists actor runs created during the session.",
576
760
  "inputSchema": {
577
761
  "type": "object",
578
762
  "properties": {},
@@ -582,7 +766,7 @@
582
766
  },
583
767
  {
584
768
  "name": "apify_get_run",
585
- "description": "Returns the recorded REST response for apify_get_run.",
769
+ "description": "Returns Apify-shaped not-found for unmodeled actor runs.",
586
770
  "inputSchema": {
587
771
  "type": "object",
588
772
  "properties": {},
@@ -592,7 +776,7 @@
592
776
  },
593
777
  {
594
778
  "name": "apify_abort_run",
595
- "description": "Returns the recorded REST response for apify_abort_run.",
779
+ "description": "Returns Apify-shaped not-found for unmodeled actor run aborts.",
596
780
  "inputSchema": {
597
781
  "type": "object",
598
782
  "properties": {},
@@ -601,8 +785,8 @@
601
785
  "hidden": false
602
786
  },
603
787
  {
604
- "name": "apify_list_datasets",
605
- "description": "Returns the recorded REST response for apify_list_datasets.",
788
+ "name": "apify_list_schedules",
789
+ "description": "Lists schedules created during the session.",
606
790
  "inputSchema": {
607
791
  "type": "object",
608
792
  "properties": {},
@@ -611,8 +795,8 @@
611
795
  "hidden": false
612
796
  },
613
797
  {
614
- "name": "apify_list_kv_stores",
615
- "description": "Returns the recorded REST response for apify_list_kv_stores.",
798
+ "name": "apify_get_v2_store",
799
+ "description": "Lists public Actor Store entries available to this clone.",
616
800
  "inputSchema": {
617
801
  "type": "object",
618
802
  "properties": {},
@@ -621,8 +805,58 @@
621
805
  "hidden": false
622
806
  },
623
807
  {
624
- "name": "apify_list_schedules",
625
- "description": "Returns the recorded REST response for apify_list_schedules.",
808
+ "name": "apify_get_v2_store_item",
809
+ "description": "Returns Apify-shaped not-found for missing Actor Store detail reads.",
810
+ "inputSchema": {
811
+ "type": "object",
812
+ "properties": {},
813
+ "additionalProperties": true
814
+ },
815
+ "hidden": false
816
+ },
817
+ {
818
+ "name": "apify_get_webhooks",
819
+ "description": "Lists webhooks created during the session.",
820
+ "inputSchema": {
821
+ "type": "object",
822
+ "properties": {},
823
+ "additionalProperties": true
824
+ },
825
+ "hidden": false
826
+ },
827
+ {
828
+ "name": "apify_post_v2_store",
829
+ "description": "Returns the upstream method-not-allowed error for POST /v2/store.",
830
+ "inputSchema": {
831
+ "type": "object",
832
+ "properties": {},
833
+ "additionalProperties": true
834
+ },
835
+ "hidden": false
836
+ },
837
+ {
838
+ "name": "apify_post_webhooks",
839
+ "description": "Returns upstream webhook create validation errors.",
840
+ "inputSchema": {
841
+ "type": "object",
842
+ "properties": {},
843
+ "additionalProperties": true
844
+ },
845
+ "hidden": false
846
+ },
847
+ {
848
+ "name": "apify_get_webhook",
849
+ "description": "Returns upstream record-not-found for missing webhook detail reads.",
850
+ "inputSchema": {
851
+ "type": "object",
852
+ "properties": {},
853
+ "additionalProperties": true
854
+ },
855
+ "hidden": false
856
+ },
857
+ {
858
+ "name": "apify_post_webhook_test",
859
+ "description": "Returns upstream record-not-found for missing webhook test sends.",
626
860
  "inputSchema": {
627
861
  "type": "object",
628
862
  "properties": {},