@h-rig/provider-plugin 0.0.6-alpha.157 → 0.0.6-alpha.158

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 (73) hide show
  1. package/dist/bin/rig-agent-dispatch.d.ts +2 -0
  2. package/dist/bin/rig-agent-dispatch.js +863 -0
  3. package/dist/src/agent-harness/agent-mode.d.ts +1 -0
  4. package/dist/src/agent-harness/agent-mode.js +48 -0
  5. package/dist/src/agent-harness/agent-wrapper.d.ts +53 -0
  6. package/dist/src/agent-harness/agent-wrapper.js +916 -0
  7. package/dist/src/agent-harness/controlled-bash.d.ts +3 -0
  8. package/dist/src/agent-harness/controlled-bash.js +45 -0
  9. package/dist/src/agent-harness/git-ops.d.ts +2 -0
  10. package/dist/src/agent-harness/git-ops.js +27 -0
  11. package/dist/src/agent-harness/repo-ops.d.ts +8 -0
  12. package/dist/src/agent-harness/repo-ops.js +471 -0
  13. package/dist/src/agent-harness/rig-agent-entrypoint.d.ts +1 -0
  14. package/dist/src/agent-harness/rig-agent-entrypoint.js +1277 -0
  15. package/dist/src/agent-harness/rig-agent.d.ts +2 -0
  16. package/dist/src/agent-harness/rig-agent.js +1244 -0
  17. package/dist/src/agent-harness/runtime-snapshot-config.d.ts +2 -0
  18. package/dist/src/agent-harness/runtime-snapshot-config.js +25 -0
  19. package/dist/src/agent-harness/task-data.d.ts +2 -0
  20. package/dist/src/agent-harness/task-data.js +12 -0
  21. package/dist/src/agent-harness/task-ops.d.ts +10 -0
  22. package/dist/src/agent-harness/task-ops.js +53 -0
  23. package/dist/src/index.js +3366 -16
  24. package/dist/src/pi-settings-materializer.d.ts +10 -0
  25. package/dist/src/pi-settings-materializer.js +52 -0
  26. package/dist/src/plugin.d.ts +9 -2
  27. package/dist/src/plugin.js +3360 -8
  28. package/dist/src/service.d.ts +1 -1
  29. package/dist/src/session-asset-materializer-service.d.ts +13 -0
  30. package/dist/src/session-asset-materializer-service.js +124 -0
  31. package/dist/src/skill-materializer.d.ts +25 -0
  32. package/dist/src/skill-materializer.js +46 -0
  33. package/dist/src/tooling/binary-build-worker.d.ts +1 -0
  34. package/dist/src/tooling/binary-build-worker.js +323 -0
  35. package/dist/src/tooling/browser-tool-entrypoint.d.ts +2 -0
  36. package/dist/src/tooling/browser-tool-entrypoint.js +125 -0
  37. package/dist/src/tooling/browser-tools.d.ts +3 -0
  38. package/dist/src/tooling/browser-tools.js +27 -0
  39. package/dist/src/tooling/claude-router-binary.d.ts +3 -0
  40. package/dist/src/tooling/claude-router-binary.js +381 -0
  41. package/dist/src/tooling/claude-router.d.ts +22 -0
  42. package/dist/src/tooling/claude-router.js +524 -0
  43. package/dist/src/tooling/embedded-native-assets.d.ts +7 -0
  44. package/dist/src/tooling/embedded-native-assets.js +6 -0
  45. package/dist/src/tooling/file-tools.d.ts +5 -0
  46. package/dist/src/tooling/file-tools.js +224 -0
  47. package/dist/src/tooling/gateway.d.ts +4 -0
  48. package/dist/src/tooling/gateway.js +430 -0
  49. package/dist/src/tooling/native-extract.d.ts +2 -0
  50. package/dist/src/tooling/native-extract.js +44 -0
  51. package/dist/src/tooling/runtime-binary-build.d.ts +88 -0
  52. package/dist/src/tooling/runtime-binary-build.js +480 -0
  53. package/dist/src/tooling/shell-tools.d.ts +5 -0
  54. package/dist/src/tooling/shell-tools.js +217 -0
  55. package/native/darwin-arm64/rig-shell +0 -0
  56. package/native/darwin-arm64/rig-shell.build-manifest.json +4 -0
  57. package/native/darwin-arm64/rig-tools +0 -0
  58. package/native/darwin-arm64/rig-tools.build-manifest.json +4 -0
  59. package/native/darwin-x64/rig-shell +0 -0
  60. package/native/darwin-x64/rig-tools +0 -0
  61. package/native/linux-arm64/rig-shell +0 -0
  62. package/native/linux-arm64/rig-tools +0 -0
  63. package/native/linux-x64/rig-shell +0 -0
  64. package/native/linux-x64/rig-tools +0 -0
  65. package/native/win32-x64/rig-shell.exe +0 -0
  66. package/native/win32-x64/rig-tools.exe +0 -0
  67. package/package.json +54 -5
  68. package/dist/src/claude-stream-records.d.ts +0 -24
  69. package/dist/src/claude-stream-records.js +0 -158
  70. package/dist/src/codex-app-server.d.ts +0 -16
  71. package/dist/src/codex-app-server.js +0 -548
  72. package/dist/src/codex-exec-records.d.ts +0 -27
  73. package/dist/src/codex-exec-records.js +0 -203
@@ -0,0 +1,2 @@
1
+ import type { RuntimeSnapshotConfig } from "@rig/contracts";
2
+ export declare function loadRuntimeSnapshotConfig(projectRoot: string): RuntimeSnapshotConfig;
@@ -0,0 +1,25 @@
1
+ // @bun
2
+ // packages/provider-plugin/src/agent-harness/runtime-snapshot-config.ts
3
+ import { existsSync, readFileSync } from "fs";
4
+ import { resolve } from "path";
5
+ var DEFAULT_RUNTIME_SNAPSHOT = { enabled: true };
6
+ function loadRuntimeSnapshotConfig(projectRoot) {
7
+ const configPath = resolve(projectRoot, "rig/policy/policy.json");
8
+ if (!existsSync(configPath))
9
+ return { ...DEFAULT_RUNTIME_SNAPSHOT };
10
+ try {
11
+ const parsed = JSON.parse(readFileSync(configPath, "utf8"));
12
+ const runtimeSnapshot = parsed.runtime_snapshot;
13
+ if (runtimeSnapshot && typeof runtimeSnapshot === "object" && !Array.isArray(runtimeSnapshot)) {
14
+ const enabled = runtimeSnapshot.enabled;
15
+ if (typeof enabled === "boolean")
16
+ return { enabled };
17
+ }
18
+ } catch {
19
+ return { ...DEFAULT_RUNTIME_SNAPSHOT };
20
+ }
21
+ return { ...DEFAULT_RUNTIME_SNAPSHOT };
22
+ }
23
+ export {
24
+ loadRuntimeSnapshotConfig
25
+ };
@@ -0,0 +1,2 @@
1
+ import { type TaskDataService } from "@rig/contracts";
2
+ export declare function taskData(): TaskDataService;
@@ -0,0 +1,12 @@
1
+ // @bun
2
+ // packages/provider-plugin/src/agent-harness/task-data.ts
3
+ import { TASK_DATA_SERVICE_CAPABILITY } from "@rig/contracts";
4
+ import { defineCapability } from "@rig/core/capability";
5
+ import { requireInstalledCapability } from "@rig/core/capability-loaders";
6
+ var TaskDataCap = defineCapability(TASK_DATA_SERVICE_CAPABILITY);
7
+ function taskData() {
8
+ return requireInstalledCapability(TaskDataCap, "task-data capability unavailable: load @rig/task-sources-plugin (default bundle) before running the provider agent harness.");
9
+ }
10
+ export {
11
+ taskData
12
+ };
@@ -0,0 +1,10 @@
1
+ export declare function taskArtifactDir(projectRoot: string, taskId?: string): string;
2
+ export declare function taskArtifacts(projectRoot: string, taskId?: string): void;
3
+ export declare function taskArtifactWrite(projectRoot: string, filename: string, content: string, taskId?: string): void;
4
+ export declare function taskDeps(projectRoot: string, taskId?: string): Promise<void>;
5
+ export declare function taskInfo(projectRoot: string, taskId?: string): Promise<void>;
6
+ export declare function taskLookup(projectRoot: string, id: string): string;
7
+ export declare function taskRecord(projectRoot: string, type: "decision" | "failure", text: string, taskId?: string): void;
8
+ export declare function taskScope(projectRoot: string, expandFiles: boolean, taskId?: string): Promise<void>;
9
+ export declare function taskStatus(projectRoot: string): void;
10
+ export declare function taskValidate(projectRoot: string, taskId?: string, validatorRegistry?: unknown): Promise<boolean>;
@@ -0,0 +1,53 @@
1
+ // @bun
2
+ // packages/provider-plugin/src/agent-harness/task-data.ts
3
+ import { TASK_DATA_SERVICE_CAPABILITY } from "@rig/contracts";
4
+ import { defineCapability } from "@rig/core/capability";
5
+ import { requireInstalledCapability } from "@rig/core/capability-loaders";
6
+ var TaskDataCap = defineCapability(TASK_DATA_SERVICE_CAPABILITY);
7
+ function taskData() {
8
+ return requireInstalledCapability(TaskDataCap, "task-data capability unavailable: load @rig/task-sources-plugin (default bundle) before running the provider agent harness.");
9
+ }
10
+
11
+ // packages/provider-plugin/src/agent-harness/task-ops.ts
12
+ function taskArtifactDir(projectRoot, taskId) {
13
+ return taskData().taskArtifactDir(projectRoot, taskId);
14
+ }
15
+ function taskArtifacts(projectRoot, taskId) {
16
+ taskData().taskArtifacts(projectRoot, taskId);
17
+ }
18
+ function taskArtifactWrite(projectRoot, filename, content, taskId) {
19
+ taskData().taskArtifactWrite(projectRoot, filename, content, taskId);
20
+ }
21
+ function taskDeps(projectRoot, taskId) {
22
+ return taskData().taskDeps(projectRoot, taskId);
23
+ }
24
+ function taskInfo(projectRoot, taskId) {
25
+ return taskData().taskInfo(projectRoot, taskId);
26
+ }
27
+ function taskLookup(projectRoot, id) {
28
+ return taskData().taskLookup(projectRoot, id);
29
+ }
30
+ function taskRecord(projectRoot, type, text, taskId) {
31
+ taskData().taskRecord(projectRoot, type, text, taskId);
32
+ }
33
+ function taskScope(projectRoot, expandFiles, taskId) {
34
+ return taskData().taskScope(projectRoot, expandFiles, taskId);
35
+ }
36
+ function taskStatus(projectRoot) {
37
+ taskData().taskStatus(projectRoot);
38
+ }
39
+ function taskValidate(projectRoot, taskId, validatorRegistry) {
40
+ return taskData().taskValidate(projectRoot, taskId, validatorRegistry);
41
+ }
42
+ export {
43
+ taskValidate,
44
+ taskStatus,
45
+ taskScope,
46
+ taskRecord,
47
+ taskLookup,
48
+ taskInfo,
49
+ taskDeps,
50
+ taskArtifacts,
51
+ taskArtifactWrite,
52
+ taskArtifactDir
53
+ };