Skip to content

Commit 0ba75a6

Browse files
committed
Merge branch 'feature/openai-acp-worker-license'
2 parents ceca307 + 0c1c9df commit 0ba75a6

19 files changed

Lines changed: 437 additions & 0 deletions

workers-registry/openai-agent/src/agent.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/*
2+
* Apache License 2.0
3+
* Copyright (c) 2025–present Raman Marozau, Target Insight Function.
4+
* Contact: raman@worktif.com
5+
*
6+
* This file is part of the stdio bus protocol reference implementation:
7+
* stdio_bus_kernel_workers (target: <target_stdio_bus_kernel_workers>).
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License");
10+
* you may not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS,
17+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*
21+
* SPDX-License-Identifier: Apache-2.0
22+
*/
23+
124
import type {
225
Agent,
326
AgentSideConnection,

workers-registry/openai-agent/src/client.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/*
2+
* Apache License 2.0
3+
* Copyright (c) 2025–present Raman Marozau, Target Insight Function.
4+
* Contact: raman@worktif.com
5+
*
6+
* This file is part of the stdio bus protocol reference implementation:
7+
* stdio_bus_kernel_workers (target: <target_stdio_bus_kernel_workers>).
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License");
10+
* you may not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS,
17+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*
21+
* SPDX-License-Identifier: Apache-2.0
22+
*/
23+
124
import { AgentConfig, ChatCompletionResult, ChatCompletionsRequest, OpenAIMessage, SSEChunk } from './types.js';
225
import { parseLine } from './sse-parser.js';
326

workers-registry/openai-agent/src/config.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/*
2+
* Apache License 2.0
3+
* Copyright (c) 2025–present Raman Marozau, Target Insight Function.
4+
* Contact: raman@worktif.com
5+
*
6+
* This file is part of the stdio bus protocol reference implementation:
7+
* stdio_bus_kernel_workers (target: <target_stdio_bus_kernel_workers>).
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License");
10+
* you may not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS,
17+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*
21+
* SPDX-License-Identifier: Apache-2.0
22+
*/
23+
124
import { AgentConfig } from './types.js';
225

326
export function loadConfig(): AgentConfig {

workers-registry/openai-agent/src/index.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/*
2+
* Apache License 2.0
3+
* Copyright (c) 2025–present Raman Marozau, Target Insight Function.
4+
* Contact: raman@worktif.com
5+
*
6+
* This file is part of the stdio bus protocol reference implementation:
7+
* stdio_bus_kernel_workers (target: <target_stdio_bus_kernel_workers>).
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License");
10+
* you may not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS,
17+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*
21+
* SPDX-License-Identifier: Apache-2.0
22+
*/
23+
124
/**
225
* OpenAI Agent Worker for stdio Bus kernel
326
*

workers-registry/openai-agent/src/session-manager.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/*
2+
* Apache License 2.0
3+
* Copyright (c) 2025–present Raman Marozau, Target Insight Function.
4+
* Contact: raman@worktif.com
5+
*
6+
* This file is part of the stdio bus protocol reference implementation:
7+
* stdio_bus_kernel_workers (target: <target_stdio_bus_kernel_workers>).
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License");
10+
* you may not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS,
17+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*
21+
* SPDX-License-Identifier: Apache-2.0
22+
*/
23+
124
import crypto from 'node:crypto';
225
import { Session } from './session.js';
326

workers-registry/openai-agent/src/session.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/*
2+
* Apache License 2.0
3+
* Copyright (c) 2025–present Raman Marozau, Target Insight Function.
4+
* Contact: raman@worktif.com
5+
*
6+
* This file is part of the stdio bus protocol reference implementation:
7+
* stdio_bus_kernel_workers (target: <target_stdio_bus_kernel_workers>).
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License");
10+
* you may not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS,
17+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*
21+
* SPDX-License-Identifier: Apache-2.0
22+
*/
23+
124
export interface HistoryEntry {
225
role: 'user' | 'assistant';
326
content: string;

workers-registry/openai-agent/src/sse-parser.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/*
2+
* Apache License 2.0
3+
* Copyright (c) 2025–present Raman Marozau, Target Insight Function.
4+
* Contact: raman@worktif.com
5+
*
6+
* This file is part of the stdio bus protocol reference implementation:
7+
* stdio_bus_kernel_workers (target: <target_stdio_bus_kernel_workers>).
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License");
10+
* you may not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS,
17+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*
21+
* SPDX-License-Identifier: Apache-2.0
22+
*/
23+
124
import { SSEEvent } from './types.js';
225

326
const DATA_PREFIX = 'data: ';

workers-registry/openai-agent/src/types.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/*
2+
* Apache License 2.0
3+
* Copyright (c) 2025–present Raman Marozau, Target Insight Function.
4+
* Contact: raman@worktif.com
5+
*
6+
* This file is part of the stdio bus protocol reference implementation:
7+
* stdio_bus_kernel_workers (target: <target_stdio_bus_kernel_workers>).
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License");
10+
* you may not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS,
17+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*
21+
* SPDX-License-Identifier: Apache-2.0
22+
*/
23+
124
export interface OpenAIMessage {
225
role: 'system' | 'user' | 'assistant';
326
content: string;

workers-registry/openai-agent/tests/agent.property.test.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/*
2+
* Apache License 2.0
3+
* Copyright (c) 2025–present Raman Marozau, Target Insight Function.
4+
* Contact: raman@worktif.com
5+
*
6+
* This file is part of the stdio bus protocol reference implementation:
7+
* stdio_bus_kernel_workers (target: <target_stdio_bus_kernel_workers>).
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License");
10+
* you may not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS,
17+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*
21+
* SPDX-License-Identifier: Apache-2.0
22+
*/
23+
124
import * as fc from 'fast-check';
225
import { OpenAIAgent } from '../src/agent';
326

workers-registry/openai-agent/tests/agent.test.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/*
2+
* Apache License 2.0
3+
* Copyright (c) 2025–present Raman Marozau, Target Insight Function.
4+
* Contact: raman@worktif.com
5+
*
6+
* This file is part of the stdio bus protocol reference implementation:
7+
* stdio_bus_kernel_workers (target: <target_stdio_bus_kernel_workers>).
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License");
10+
* you may not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS,
17+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*
21+
* SPDX-License-Identifier: Apache-2.0
22+
*/
23+
124
import { OpenAIAgent, convertContentBlocks, buildMessages } from '../src/agent';
225

326
// Mock loadConfig to avoid env var side effects

0 commit comments

Comments
 (0)