@pinta-ai/types 0.0.6 → 0.0.8
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/ingest.d.ts +78 -0
- package/dist/ingest.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/ingest.d.ts
CHANGED
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export interface IngestTypeMap {
|
|
13
13
|
mcp: MCPSpan;
|
|
14
|
+
cc: CCSpan;
|
|
15
|
+
codex: CodexSpan;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
18
|
* 지원하는 ingest type union
|
|
@@ -61,6 +63,82 @@ export interface MCPSpan {
|
|
|
61
63
|
'mcp.permission.level'?: string;
|
|
62
64
|
'mcp.cost'?: number;
|
|
63
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Hook names pinta-cc currently routes via dedicated typed handlers.
|
|
68
|
+
* Other hook names are still emitted by pinta-cc's default handler
|
|
69
|
+
* (with the literal hook name as `cc.hook`); a small set is explicitly
|
|
70
|
+
* skipped (see SKIP_HOOKS in pinta-cc's src/core/types.ts).
|
|
71
|
+
*
|
|
72
|
+
* This union therefore narrows `cc.hook` for known typed-handler events
|
|
73
|
+
* but does NOT enumerate every value the wire may carry — backend code
|
|
74
|
+
* should treat unknown names as valid pass-through.
|
|
75
|
+
*/
|
|
76
|
+
export type CCHookName = 'PreToolUse' | 'PostToolUse' | 'PostToolUseFailure' | 'UserPromptSubmit' | 'SessionStart' | 'SessionEnd' | 'SubagentStart' | 'SubagentStop' | 'Stop' | 'PermissionRequest' | 'PermissionDenied';
|
|
77
|
+
/**
|
|
78
|
+
* pinta-cc adaptor가 전송하는 raw span attribute 인터페이스 (bronze).
|
|
79
|
+
* hook event의 top-level 필드가 `cc.<key>`로 flat하게 직렬화된다.
|
|
80
|
+
*
|
|
81
|
+
* Per Claude Code docs (https://code.claude.com/docs/en/hooks), the exact
|
|
82
|
+
* field presence depends on the hook name — see individual field comments.
|
|
83
|
+
*/
|
|
84
|
+
export interface CCSpan {
|
|
85
|
+
'ingest.type': 'cc';
|
|
86
|
+
'cc.hook': CCHookName;
|
|
87
|
+
'cc.session_id': string;
|
|
88
|
+
'cc.transcript_path': string;
|
|
89
|
+
'cc.cwd': string;
|
|
90
|
+
'cc.permission_mode'?: string;
|
|
91
|
+
'cc.tool_name'?: string;
|
|
92
|
+
'cc.tool_input'?: string;
|
|
93
|
+
'cc.tool_response'?: string;
|
|
94
|
+
'cc.tool_use_id'?: string;
|
|
95
|
+
'cc.prompt'?: string;
|
|
96
|
+
'cc.source'?: string;
|
|
97
|
+
'cc.model'?: string;
|
|
98
|
+
'cc.reason'?: string;
|
|
99
|
+
'cc.agent_id'?: string;
|
|
100
|
+
'cc.agent_type'?: string;
|
|
101
|
+
'cc.agent_transcript_path'?: string;
|
|
102
|
+
'cc.last_assistant_message'?: string;
|
|
103
|
+
'cc.stop_hook_active'?: boolean;
|
|
104
|
+
'cc.error'?: string;
|
|
105
|
+
'cc.is_interrupt'?: boolean;
|
|
106
|
+
'cc.permission_suggestions'?: string;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Hook names pinta-codex currently routes via dedicated typed handlers.
|
|
110
|
+
* Codex exposes a smaller hook surface than Claude Code — see
|
|
111
|
+
* https://developers.openai.com/codex/hooks — so this union is narrower
|
|
112
|
+
* than CCHookName. Unknown names should be treated as valid pass-through
|
|
113
|
+
* by backend code.
|
|
114
|
+
*/
|
|
115
|
+
export type CodexHookName = 'PreToolUse' | 'PostToolUse' | 'UserPromptSubmit' | 'SessionStart' | 'Stop';
|
|
116
|
+
/**
|
|
117
|
+
* pinta-codex adaptor가 전송하는 raw span attribute 인터페이스 (bronze).
|
|
118
|
+
* hook event의 top-level 필드가 `codex.<key>`로 flat하게 직렬화된다.
|
|
119
|
+
*
|
|
120
|
+
* Codex hook payload 참고: https://developers.openai.com/codex/hooks
|
|
121
|
+
* 필드 프레즌스는 hook 이름에 따라 다르다 — 필드별 주석 참조.
|
|
122
|
+
*/
|
|
123
|
+
export interface CodexSpan {
|
|
124
|
+
'ingest.type': 'codex';
|
|
125
|
+
'codex.hook': CodexHookName;
|
|
126
|
+
'codex.session_id': string;
|
|
127
|
+
'codex.transcript_path': string;
|
|
128
|
+
'codex.cwd': string;
|
|
129
|
+
'codex.permission_mode'?: string;
|
|
130
|
+
'codex.model'?: string;
|
|
131
|
+
'codex.turn_id'?: string;
|
|
132
|
+
'codex.tool_name'?: string;
|
|
133
|
+
'codex.tool_input'?: string;
|
|
134
|
+
'codex.tool_response'?: string;
|
|
135
|
+
'codex.tool_use_id'?: string;
|
|
136
|
+
'codex.prompt'?: string;
|
|
137
|
+
'codex.source'?: string;
|
|
138
|
+
'codex.last_assistant_message'?: string;
|
|
139
|
+
'codex.stop_hook_active'?: boolean;
|
|
140
|
+
'codex.client'?: string;
|
|
141
|
+
}
|
|
64
142
|
/** Resource-level member identity attributes */
|
|
65
143
|
export interface MemberIdentity {
|
|
66
144
|
'member.identity.id'?: string;
|
package/dist/ingest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingest.d.ts","sourceRoot":"","sources":["../src/ingest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ingest.d.ts","sourceRoot":"","sources":["../src/ingest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,OAAO,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,aAAa,CAAC;AAM7C;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,OAAO;IAEtB,aAAa,EAAE,KAAK,CAAC;I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