orizu 0.5.5 → 0.5.6
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/dist/hosted-bootstrap.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*/
|
|
25
25
|
import { sweepForTokenResidue } from './daytona-slice.js';
|
|
26
26
|
import { redactSecrets } from './secret-redaction.js';
|
|
27
|
-
import { BEARER_BASENAME, BOOT_CONTEXT_BASENAME, DEFAULT_CACHE_REFRESH_BUFFER_MS, HELPER_SCRIPT_BASENAME, PREBAKED_MARKER_PATH, REPO_CRED_CACHE_BASENAME, SETUP_HOOK_RELATIVE_PATH, parsePrebakedMarker, renderCredentialHelperScript, serializeBootContext, } from './hosted-runtime-assets.js';
|
|
27
|
+
import { AGENT_GIT_IDENTITY, BEARER_BASENAME, BOOT_CONTEXT_BASENAME, DEFAULT_CACHE_REFRESH_BUFFER_MS, HELPER_SCRIPT_BASENAME, PREBAKED_MARKER_PATH, REPO_CRED_CACHE_BASENAME, SETUP_HOOK_RELATIVE_PATH, parsePrebakedMarker, renderCredentialHelperScript, serializeBootContext, } from './hosted-runtime-assets.js';
|
|
28
28
|
function newEventId() {
|
|
29
29
|
const cryptoObj = globalThis.crypto;
|
|
30
30
|
if (cryptoObj?.randomUUID)
|
|
@@ -236,6 +236,11 @@ export async function bootstrapHostedSandbox(opts) {
|
|
|
236
236
|
// Persist the helper repo-LOCAL (never --global) for subsequent fetch/push.
|
|
237
237
|
await session.exec(`git -C ${workspaceDir} config credential.helper ${shellSingleQuote(helperValue)}`);
|
|
238
238
|
await session.exec(`git -C ${workspaceDir} config credential.useHttpPath true`);
|
|
239
|
+
// Repo-LOCAL agent identity: the sandbox has no ambient git identity, so
|
|
240
|
+
// without this every agent `git commit` dies with "Author identity unknown"
|
|
241
|
+
// (ALI-1036, found live in QA-3). Same identity the loop stamps on events.
|
|
242
|
+
await session.exec(`git -C ${workspaceDir} config user.name ${shellSingleQuote(AGENT_GIT_IDENTITY.name)}`);
|
|
243
|
+
await session.exec(`git -C ${workspaceDir} config user.email ${shellSingleQuote(AGENT_GIT_IDENTITY.email)}`);
|
|
239
244
|
record('repo_cloned', true, `cloned ${opts.sessionBranch}`);
|
|
240
245
|
await sink.append('repo_cloned', { branch: opts.sessionBranch, workspaceDir });
|
|
241
246
|
// 4 — Provision the Orizu CLI (non-fatal, recorded — OpenInspect setup.sh
|
|
@@ -31,6 +31,14 @@ export const DEFAULT_CACHE_REFRESH_BUFFER_MS = 5 * 60 * 1000;
|
|
|
31
31
|
/** Customer setup hook path, relative to the repo root (mirrors OpenInspect's
|
|
32
32
|
* `.openinspect/setup.sh` — fresh-boot only, non-fatal, output captured). */
|
|
33
33
|
export const SETUP_HOOK_RELATIVE_PATH = '.orizu/setup.sh';
|
|
34
|
+
/**
|
|
35
|
+
* The git author identity for hosted-agent commits. Bootstrap configures it
|
|
36
|
+
* repo-LOCAL in the sandbox clone (never --global) so agent `git commit` works
|
|
37
|
+
* out of the box — the sandbox has no ambient identity and commits died with
|
|
38
|
+
* "Author identity unknown" (ALI-1036, found live in QA-3). The loop uses the
|
|
39
|
+
* same identity for run-event attribution; keep them identical.
|
|
40
|
+
*/
|
|
41
|
+
export const AGENT_GIT_IDENTITY = { name: 'Orizu Agent', email: 'agent@orizu.ai' };
|
|
34
42
|
// -- Pre-baked runtime marker (ALI-1017) -------------------------------------
|
|
35
43
|
/**
|
|
36
44
|
* Absolute path of the marker the pre-baked hosted-runtime image writes at build
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
import { createLocalSimProvider, } from './sandbox-provider.js';
|
|
38
38
|
import { bootstrapHostedSandbox, createBootstrapRunEventSink, } from './hosted-bootstrap.js';
|
|
39
39
|
import { resumeRunEventSink } from './hosted-run-event-sink.js';
|
|
40
|
-
import { BEARER_BASENAME } from './hosted-runtime-assets.js';
|
|
40
|
+
import { AGENT_GIT_IDENTITY, BEARER_BASENAME } from './hosted-runtime-assets.js';
|
|
41
41
|
import { createVercelProvider } from './vercel-sandbox-provider.js';
|
|
42
42
|
import { buildEgressPolicy, DEFAULT_EGRESS_CANARY_HOST } from './egress-policy.js';
|
|
43
43
|
import { hostedLoopCommand } from './hosted-loop.js';
|
|
@@ -355,7 +355,7 @@ export async function startHostedSession(opts) {
|
|
|
355
355
|
model,
|
|
356
356
|
reasoningEffort: opts.reasoningEffort,
|
|
357
357
|
messageId: `${runId}:task`,
|
|
358
|
-
author:
|
|
358
|
+
author: AGENT_GIT_IDENTITY,
|
|
359
359
|
anthropicDummyKey: opts.modelApiKey ? ANTHROPIC_DUMMY_KEY : undefined,
|
|
360
360
|
// ALI-1017: skip the in-sandbox opencode install when the image ships it.
|
|
361
361
|
prebaked: prebakedImage,
|
package/package.json
CHANGED
package/src/hosted-bootstrap.ts
CHANGED
|
@@ -27,6 +27,7 @@ import type { SandboxSession } from './sandbox-provider.js'
|
|
|
27
27
|
import { sweepForTokenResidue, type HygieneFinding } from './daytona-slice.js'
|
|
28
28
|
import { redactSecrets } from './secret-redaction.js'
|
|
29
29
|
import {
|
|
30
|
+
AGENT_GIT_IDENTITY,
|
|
30
31
|
BEARER_BASENAME,
|
|
31
32
|
BOOT_CONTEXT_BASENAME,
|
|
32
33
|
DEFAULT_CACHE_REFRESH_BUFFER_MS,
|
|
@@ -410,6 +411,11 @@ export async function bootstrapHostedSandbox(opts: HostedBootstrapOptions): Prom
|
|
|
410
411
|
// Persist the helper repo-LOCAL (never --global) for subsequent fetch/push.
|
|
411
412
|
await session.exec(`git -C ${workspaceDir} config credential.helper ${shellSingleQuote(helperValue)}`)
|
|
412
413
|
await session.exec(`git -C ${workspaceDir} config credential.useHttpPath true`)
|
|
414
|
+
// Repo-LOCAL agent identity: the sandbox has no ambient git identity, so
|
|
415
|
+
// without this every agent `git commit` dies with "Author identity unknown"
|
|
416
|
+
// (ALI-1036, found live in QA-3). Same identity the loop stamps on events.
|
|
417
|
+
await session.exec(`git -C ${workspaceDir} config user.name ${shellSingleQuote(AGENT_GIT_IDENTITY.name)}`)
|
|
418
|
+
await session.exec(`git -C ${workspaceDir} config user.email ${shellSingleQuote(AGENT_GIT_IDENTITY.email)}`)
|
|
413
419
|
record('repo_cloned', true, `cloned ${opts.sessionBranch}`)
|
|
414
420
|
await sink.append('repo_cloned', { branch: opts.sessionBranch, workspaceDir })
|
|
415
421
|
|
|
@@ -35,6 +35,15 @@ export const DEFAULT_CACHE_REFRESH_BUFFER_MS = 5 * 60 * 1000
|
|
|
35
35
|
* `.openinspect/setup.sh` — fresh-boot only, non-fatal, output captured). */
|
|
36
36
|
export const SETUP_HOOK_RELATIVE_PATH = '.orizu/setup.sh'
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* The git author identity for hosted-agent commits. Bootstrap configures it
|
|
40
|
+
* repo-LOCAL in the sandbox clone (never --global) so agent `git commit` works
|
|
41
|
+
* out of the box — the sandbox has no ambient identity and commits died with
|
|
42
|
+
* "Author identity unknown" (ALI-1036, found live in QA-3). The loop uses the
|
|
43
|
+
* same identity for run-event attribution; keep them identical.
|
|
44
|
+
*/
|
|
45
|
+
export const AGENT_GIT_IDENTITY = { name: 'Orizu Agent', email: 'agent@orizu.ai' } as const
|
|
46
|
+
|
|
38
47
|
// -- Pre-baked runtime marker (ALI-1017) -------------------------------------
|
|
39
48
|
|
|
40
49
|
/**
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
type HostedRuntimePaths,
|
|
50
50
|
} from './hosted-bootstrap.js'
|
|
51
51
|
import { resumeRunEventSink } from './hosted-run-event-sink.js'
|
|
52
|
-
import { BEARER_BASENAME } from './hosted-runtime-assets.js'
|
|
52
|
+
import { AGENT_GIT_IDENTITY, BEARER_BASENAME } from './hosted-runtime-assets.js'
|
|
53
53
|
import { createVercelProvider } from './vercel-sandbox-provider.js'
|
|
54
54
|
import { buildEgressPolicy, DEFAULT_EGRESS_CANARY_HOST } from './egress-policy.js'
|
|
55
55
|
import { hostedLoopCommand, type HostedLoopContext } from './hosted-loop.js'
|
|
@@ -534,7 +534,7 @@ export async function startHostedSession(
|
|
|
534
534
|
model,
|
|
535
535
|
reasoningEffort: opts.reasoningEffort,
|
|
536
536
|
messageId: `${runId}:task`,
|
|
537
|
-
author:
|
|
537
|
+
author: AGENT_GIT_IDENTITY,
|
|
538
538
|
anthropicDummyKey: opts.modelApiKey ? ANTHROPIC_DUMMY_KEY : undefined,
|
|
539
539
|
// ALI-1017: skip the in-sandbox opencode install when the image ships it.
|
|
540
540
|
prebaked: prebakedImage,
|